Skip to contentSkip to conversation

Fix 2.6.3[12] user_mad backports

PATCH New sebastien dugue 1 participant 1 message Feb 1, 2010 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix 2.6.3[12] user_mad backports

The ib_umad_port's sm_sem semaphore is initialized as a mutex which
although it builds (with a warning) badly breaks at runtime.

Fix this by using the proper initialization function sema_init().

Also fix those DOSish end of lines.

---
 .../backport/2.6.31/user_mad_mutex_init.patch      |   30 ++++++++++----------
 .../backport/2.6.32/user_mad_mutex_init.patch      |   30 ++++++++++----------
 2 files changed, 30 insertions(+), 30 deletions(-)
kernel_patches/backport/2.6.31/user_mad_mutex_init.patch +15 -15
index 09cb6e6..3054f1e 100644
@@ -1,15 +1,15 @@
-From: Sven-Thorsten Dietrich <[email protected]>
-Subject: use updated mutex_init.
-
-Signed-off-by: Sven-Thorsten Dietrich <[email protected]>
---- a/drivers/infiniband/core/user_mad.c	2009-11-24 07:52:27.000000000 -0800
-+++ b/drivers/infiniband/core//user_mad.c	2012-09-01 13:06:26.000000000 -0700
-@@ -1003,7 +1003,7 @@
- 
- 	port->ib_dev   = device;
- 	port->port_num = port_num;
--	init_MUTEX(&port->sm_sem);
-+	mutex_init(&port->sm_sem);
- 	mutex_init(&port->file_mutex);
- 	INIT_LIST_HEAD(&port->file_list);
- 
+From: Sven-Thorsten Dietrich <[email protected]>
+Subject: use updated mutex_init.
+
+Signed-off-by: Sven-Thorsten Dietrich <[email protected]>
+--- a/drivers/infiniband/core/user_mad.c	2009-11-24 07:52:27.000000000 -0800
++++ b/drivers/infiniband/core//user_mad.c	2012-09-01 13:06:26.000000000 -0700
+@@ -1003,7 +1003,7 @@
+ 
+ 	port->ib_dev   = device;
+ 	port->port_num = port_num;
+-	init_MUTEX(&port->sm_sem);
++	sema_init(&port->sm_sem, 1);
+ 	mutex_init(&port->file_mutex);
+ 	INIT_LIST_HEAD(&port->file_list);
+ 
kernel_patches/backport/2.6.32/user_mad_mutex_init.patch +15 -15
index 09cb6e6..3054f1e 100644
@@ -1,15 +1,15 @@
-From: Sven-Thorsten Dietrich <[email protected]>
-Subject: use updated mutex_init.
-
-Signed-off-by: Sven-Thorsten Dietrich <[email protected]>
---- a/drivers/infiniband/core/user_mad.c	2009-11-24 07:52:27.000000000 -0800
-+++ b/drivers/infiniband/core//user_mad.c	2012-09-01 13:06:26.000000000 -0700
-@@ -1003,7 +1003,7 @@
- 
- 	port->ib_dev   = device;
- 	port->port_num = port_num;
--	init_MUTEX(&port->sm_sem);
-+	mutex_init(&port->sm_sem);
- 	mutex_init(&port->file_mutex);
- 	INIT_LIST_HEAD(&port->file_list);
- 
+From: Sven-Thorsten Dietrich <[email protected]>
+Subject: use updated mutex_init.
+
+Signed-off-by: Sven-Thorsten Dietrich <[email protected]>
+--- a/drivers/infiniband/core/user_mad.c	2009-11-24 07:52:27.000000000 -0800
++++ b/drivers/infiniband/core//user_mad.c	2012-09-01 13:06:26.000000000 -0700
+@@ -1003,7 +1003,7 @@
+ 
+ 	port->ib_dev   = device;
+ 	port->port_num = port_num;
+-	init_MUTEX(&port->sm_sem);
++	sema_init(&port->sm_sem, 1);
+ 	mutex_init(&port->file_mutex);
+ 	INIT_LIST_HEAD(&port->file_list);
+ 
Signature · 6 lines
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html