From patchwork Mon Mar 7 12:05:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 615741 X-Patchwork-Delegate: alexne@voltaire.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p27Em0fW030514 for ; Mon, 7 Mar 2011 14:48:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752021Ab1CGOr7 (ORCPT ); Mon, 7 Mar 2011 09:47:59 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:51715 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752428Ab1CGOr7 (ORCPT ); Mon, 7 Mar 2011 09:47:59 -0500 Received: from Internal Mail-Server by MTLPINE2 (envelope-from alexne@mellanox.com) with SMTP; 7 Mar 2011 14:05:11 +0200 Received: from MTRCASDAG01.mtl.com (172.25.0.174) by MTLCAS01.mtl.com (10.0.8.71) with Microsoft SMTP Server (TLS) id 14.1.270.1; Mon, 7 Mar 2011 14:05:10 +0200 Received: from localhost (172.25.6.157) by MTRCASDAG01.mtl.com (172.25.0.174) with Microsoft SMTP Server (TLS) id 14.1.270.1; Mon, 7 Mar 2011 14:05:10 +0200 Date: Mon, 7 Mar 2011 14:05:04 +0200 From: Alex Netes To: Subject: [PATCH] opensm: fixed potential null variable dereferencing in libvendor Message-ID: <20110307120504.GP5577@calypso.voltaire.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [172.25.6.157] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 07 Mar 2011 14:48:00 +0000 (UTC) diff --git a/libvendor/osm_vendor_ibumad.c b/libvendor/osm_vendor_ibumad.c index be2dda2..5cd6f46 100644 --- a/libvendor/osm_vendor_ibumad.c +++ b/libvendor/osm_vendor_ibumad.c @@ -174,7 +174,7 @@ put_madw(osm_vendor_t * p_vend, osm_madw_t * p_madw, ib_net64_t tid) pthread_mutex_unlock(&p_vend->match_tbl_mutex); return; } - if (oldest > m->version) { + if (oldest >= m->version) { oldest = m->version; lru = m; }