From: Roland Dreier Date: Mon, 7 Nov 2005 18:41:29 +0000 (-0800) Subject: [IB] umad: avoid potential deadlock when unregistering MAD agents X-Git-Tag: v2.6.15-rc1~45^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f76e82947b977a1008cfd2868351a701c93c69c;p=pandora-kernel.git [IB] umad: avoid potential deadlock when unregistering MAD agents ib_unregister_mad_agent() completes all pending MAD sends and waits for the agent's send_handler routine to return. umad's send_handler() calls queue_packet(), which does down_read() on the port mutex to look up the agent ID. This means that the port mutex cannot be held for writing while calling ib_unregister_mad_agent(), or else it will deadlock. This patch fixes all the calls to ib_unregister_mad_agent() in the umad module to avoid this deadlock. Signed-off-by: Roland Dreier --- Reading git-diff-tree failed