[lkml]   [2006]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 16/32] IB/ucm: Fix deadlock in cleanup
-stable review patch.  If anyone has any objections, please let us know.

From: Michael S Tsirkin <>

ib_ucm_cleanup_events() holds file_mutex while calling ib_destroy_cm_id().
This can deadlock since ib_destroy_cm_id() flushes event handlers, and
ib_ucm_event_handler() needs file_mutex, too. Therefore, drop the
file_mutex during the call to ib_destroy_cm_id().

Signed-off-by: Michael S. Tsirkin <>
Signed-off-by: Roland Dreier <>
Acked-by: Sean Hefty <>
Signed-off-by: Chris Wright <>

Hello, -stable team!
This patch backports commit f469b2626f48829c06e40ac799c1edf62b12048e to 2.6.19.
Please consider it for 2.6.19.y - this fixes a deadlock reproduced here at Mellanox.

drivers/infiniband/core/ucm.c | 2 ++
1 file changed, 2 insertions(+)

--- linux-2.6.19.orig/drivers/infiniband/core/ucm.c
+++ linux-2.6.19/drivers/infiniband/core/ucm.c
@@ -161,12 +161,14 @@ static void ib_ucm_cleanup_events(struct
struct ib_ucm_event, ctx_list);
+ mutex_unlock(&ctx->file->file_mutex);

/* clear incoming connections. */
if (ib_ucm_new_cm_id(uevent->resp.event))

+ mutex_lock(&ctx->file->file_mutex);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-12-09 01:11    [W:0.168 / U:35.956 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site