RDMA/iser: Fix possible mr leak on device removal event
authorSagi Grimberg <[email protected]>
Mon, 27 Feb 2017 18:16:33 +0000 (20:16 +0200)
committerDoug Ledford <[email protected]>
Sat, 25 Mar 2017 02:31:19 +0000 (22:31 -0400)
commitea174c9573b0e0c8bc1a7a90fe9360ccb7aa9cbb
tree7819bc75f9c2e729d6520a91872e17a9bc3defd3
parentb7363e67b23e04c23c2a99437feefac7292a88bc
RDMA/iser: Fix possible mr leak on device removal event

When the rdma device is removed, we must cleanup all
the rdma resources within the DEVICE_REMOVAL event
handler to let the device teardown gracefully. When
this happens with live I/O, some memory regions are
occupied. Thus, track them too and dereg all the mr's.

We are safe with mr access by iscsi_iser_cleanup_task.

Reported-by: Raju Rangoju <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Reviewed-by: Max Gurtovoy <[email protected]>
Reviewed-by: Max Gurtovoy <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
drivers/infiniband/ulp/iser/iscsi_iser.h
drivers/infiniband/ulp/iser/iser_verbs.c