Re: [PATCH 2/5] ib_srp: removed superfluous warning in send timeout case
From: Bart Van Assche <hidden>
Date: 2012-09-01 07:44:02
On 08/31/12 20:00, dongsu.park-EIkl63zCoXaH+58JC4qpiA@public.gmane.org wrote:
quoted hunk
From: Dongsu Park <redacted> Signed-off-By: Sebastian Riemer <redacted> --- drivers/infiniband/ulp/srp/ib_srp.c | 1 - 1 file changed, 1 deletion(-)diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index a0d0ca2..1b274484 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c@@ -534,7 +534,6 @@ static void srp_wait_last_send_wqe(struct srp_target_port *target) msleep(20); } - WARN_ON(!target->last_send_wqe); } static void srp_disconnect_target(struct srp_target_port *target)
The purpose of the functions srp_wait_last_recv_wqe() and srp_wait_last_send_wqe() is to wait until the IB HCA has finished delivering work completions to ib_srp. The InfiniBand Architecture Manual specifies how long that can take. If the above WARN_ON() statement is hit it means that it took longer than expected before all pending work was completed. Letting srp_wait_last_send_wqe() return before all pending work has been completed is dangerous because that may trigger a use-after-free in the code that calls that function. So we have to dig deeper here and find out why that WARN_ON() statement was hit. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html