[PATCH] IB: allow NULL sa_query callbacks
authorRoland Dreier <roland@topspin.com>
Wed, 25 May 2005 19:31:29 +0000 (12:31 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 25 May 2005 22:31:28 +0000 (15:31 -0700)
commite4f50f003dc568f6fc3904d451c562007bd09640
tree6af02e623ba96d367c1c3948b9bb85bc793cc47f
parent4f60fdf613536402e3313c5019b3ae6060b2ae4a
[PATCH] IB: allow NULL sa_query callbacks

Check if a client passes a NULL callback into an SA query, and if so, never
call back.  This fixes an oops if someone unloads ib_ipoib and ib_sa in
rapid succession.  ib_ipoib does an MCMember delete with a NULL callback
and 0 timeout on unload, which is usually fine since the delete completes
successfully.  However, if ib_sa is unloaded immediately afterwards, the
delete will be canceled and ib_sa will try to call the (now already
unloaded) ib_ipoib module back with the cancel completion, which triggers
the oops.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/infiniband/core/sa_query.c