public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix 2.6.3[12] user_mad backports
@ 2010-02-01 15:24 sebastien dugue
  0 siblings, 0 replies; only message in thread
From: sebastien dugue @ 2010-02-01 15:24 UTC (permalink / raw)
  To: linux-rdma; +Cc: Roland Dreier, Sean Hefty


  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.

Signed-off-by: Sebastien Dugue <sebastien.dugue-6ktuUTfB/bM@public.gmane.org>
---
 .../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(-)

diff --git a/kernel_patches/backport/2.6.31/user_mad_mutex_init.patch b/kernel_patches/backport/2.6.31/user_mad_mutex_init.patch
index 09cb6e6..3054f1e 100644
--- a/kernel_patches/backport/2.6.31/user_mad_mutex_init.patch
+++ b/kernel_patches/backport/2.6.31/user_mad_mutex_init.patch
@@ -1,15 +1,15 @@
-From: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
-Subject: use updated mutex_init.
-
-Signed-off-by: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
---- 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 <sdietrich-l3A5Bk7waGM@public.gmane.org>
+Subject: use updated mutex_init.
+
+Signed-off-by: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
+--- 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);
+ 
diff --git a/kernel_patches/backport/2.6.32/user_mad_mutex_init.patch b/kernel_patches/backport/2.6.32/user_mad_mutex_init.patch
index 09cb6e6..3054f1e 100644
--- a/kernel_patches/backport/2.6.32/user_mad_mutex_init.patch
+++ b/kernel_patches/backport/2.6.32/user_mad_mutex_init.patch
@@ -1,15 +1,15 @@
-From: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
-Subject: use updated mutex_init.
-
-Signed-off-by: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
---- 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 <sdietrich-l3A5Bk7waGM@public.gmane.org>
+Subject: use updated mutex_init.
+
+Signed-off-by: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
+--- 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);
+ 
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-01 15:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-01 15:24 [PATCH] Fix 2.6.3[12] user_mad backports sebastien dugue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox