lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1285187417-10928-1-git-send-email-nab@linux-iscsi.org>
Date:	Wed, 22 Sep 2010 13:30:17 -0700
From:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To:	linux-kernel <linux-kernel@...r.kernel.org>,
	netdev <netdev@...r.kernel.org>,
	linux-rdma <linux-rdma@...r.kernel.org>,
	Bernard Metzler <BMT@...ich.ibm.com>
Cc:	David Miller <davem@...emloft.net>,
	Matthew Wilcox <willy@...ux.intel.com>,
	Andi Keen <ak@...ux.intel.com>,
	Roland Dreier <rdreier@...co.com>,
	Nicholas Bellinger <nab@...ux-iscsi.org>
Subject: [PATCH 1/2] siw: Fix ib_register_device() for > v2.6.34 kernels

From: Nicholas Bellinger <nab@...ux-iscsi.org>

This patch adds a LINUX_VERSION_CODE > v2.6.34 check inside of siw_main.c:siw_register_device()
around the use of ib_register_device().  In post v2.6.34 kernels this function accepts a second
parameter used a sysfs port callback described here:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9a6edb60ec10d86b1025a0cdad68fd89f1ddaf02

This patch currently sets this second parameter to NULL.

Signed-off-by: Nicholas A. Bellinger <nab@...ux-iscsi.org>
---
 softiwarp/siw_main.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/softiwarp/siw_main.c b/softiwarp/siw_main.c
index cacedea..c97adee 100644
--- a/softiwarp/siw_main.c
+++ b/softiwarp/siw_main.c
@@ -233,8 +233,11 @@ int siw_register_device(struct siw_dev *dev)
 	ibdev->iwcm->add_ref = siw_qp_get_ref;
 	ibdev->iwcm->rem_ref = siw_qp_put_ref;
 	ibdev->iwcm->get_qp = siw_get_ofaqp;
-
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34)
+	rv = ib_register_device(ibdev, NULL);
+#else
 	rv = ib_register_device(ibdev);
+#endif
 	if (rv) {
 		dprint(DBG_DM|DBG_ON, "(dev=%s): "
 			"ib_register_device failed: rv=%d\n", ibdev->name, rv);
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ