]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Avoid a crash on device hot remove
authorJack Morgenstein <jackm@mellanox.co.il>
Thu, 3 Aug 2006 17:56:42 +0000 (10:56 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 3 Aug 2006 17:56:42 +0000 (10:56 -0700)
commit125506bb1f68278aff896ead6525eccb959c3b2b
tree81fcc683f41936597e62cdba254b89ab569e5526
parentd1653ad53e780075bb93c82539ce8362640ef2d3
IB/uverbs: Avoid a crash on device hot remove

Wait until all users have closed their device context before allowing
device unregistration to complete.  This prevents a crash caused by
referring to stale data structures.

A better solution would be to have a way to revoke contexts rather
than waiting for userspace to close the context, but that's a much
bigger change that will have to wait.  For now let's at least avoid
the crash.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/uverbs.h
drivers/infiniband/core/uverbs_main.c