RDMA/i40iw: Avoid panic when objects are being created and destroyed
authorAndrew Boyer <andrew.boyer@dell.com>
Mon, 7 May 2018 17:23:36 +0000 (13:23 -0400)
committerDoug Ledford <dledford@redhat.com>
Wed, 9 May 2018 14:45:18 +0000 (10:45 -0400)
commita75895b1ebd944a7873cbf76d30de8720955f8b3
treec074896cb17fd2f49022250e75d084ee6ca0fef0
parenta0403be8af338c319b5176c1d2975d94a930a0bf
RDMA/i40iw: Avoid panic when objects are being created and destroyed

A panic occurs when there is a newly-registered element on the QP/CQ MR
list waiting to be attached, but a different MR is deregistered. The
current code only checks for whether the list is empty, not whether the
element being deregistered is actually on the list.

Fix the panic by adding a boolean to track if the object is on the list.

Fixes: d37498417947 ("i40iw: add files for iwarp interface")
Signed-off-by: Andrew Boyer <andrew.boyer@dell.com>
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_verbs.c
drivers/infiniband/hw/i40iw/i40iw_verbs.h