linux-kernel-test/drivers/infiniband/hw/mlx4
Jack Morgenstein 3b4a8cd51e IB/mlx4: 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:24:50 -07:00
..
ah.c IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters 2007-05-08 18:00:38 -07:00
cq.c trivial: fix then -> than typos in comments and documentation 2009-01-06 11:28:06 +01:00
doorbell.c IB: expand ib_umem_get() prototype 2008-04-29 08:06:12 -07:00
Kconfig IB: Use menuconfig for InfiniBand menu 2007-07-09 20:12:26 -07:00
mad.c IB/mlx4: Fix dispatch of IB_EVENT_LID_CHANGE event 2009-01-28 14:54:35 -08:00
main.c IB/mlx4: Don't allow userspace open while recovering from catastrophic error 2009-09-05 20:24:50 -07:00
Makefile IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters 2007-05-08 18:00:38 -07:00
mlx4_ib.h IB/mlx4: Don't allow userspace open while recovering from catastrophic error 2009-09-05 20:24:50 -07:00
mr.c IB/mlx4: Don't overwrite fast registration page list when posting work request 2009-05-07 21:35:13 -07:00
qp.c IB/mlx4: Annotate CQ locking 2009-09-05 20:24:49 -07:00
srq.c mlx4: Update/add Mellanox Technologies copyright lines to mlx4 driver files 2008-07-25 10:32:52 -07:00
user.h mlx4: Update/add Mellanox Technologies copyright lines to mlx4 driver files 2008-07-25 10:32:52 -07:00