kernel_optimize_test/drivers/infiniband/hw
Jack Morgenstein d841064777 IB/mthca: Don't allow userspace open while recovering from catastrophic error
Userspace apps are supposed to release all ib device resources if they
receive a fatal async event (IBV_EVENT_DEVICE_FATAL).  However, the
app has no way of knowing when the device has come back up, except to
repeatedly attempt ibv_open_device() until it succeeds.

However, currently there is no protection against the open succeeding
while the device is in being removed following the fatal event.  In
this case, the open will succeed, but as a result the device waits in
the middle of its removal until the new app releases its resources --
and the new app will not do so, since the open succeeded at a point
following the fatal event generation.

This patch adds an "active" flag to the device. The active flag is set
to false (in the fatal event flow) before the "fatal" event is
generated, so any subsequent ibv_dev_open() call to the device will
fail until the device comes back up, thus preventing the above
deadlock.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2009-09-05 20:36:16 -07:00
..
amso1100 infiniband: Remove void casts 2009-05-13 16:53:39 -07:00
cxgb3 RDMA/cxgb3: Limit fast register size based on T3 limitations 2009-05-27 14:43:39 -07:00
ehca IB/ehca: Bump version number 2009-06-23 10:30:04 -07:00
ipath Fix deadlock in ipathfs ->get_sb() 2009-05-09 10:49:40 -04:00
mlx4 IB/mlx4: Add strong ordering to local inval and fast reg work requests 2009-06-05 10:36:24 -07:00
mthca IB/mthca: Don't allow userspace open while recovering from catastrophic error 2009-09-05 20:36:16 -07:00
nes RDMA/nes: Fix FIN state handling under error conditions 2009-06-22 22:53:28 -07:00