Re: [PATCH v3 11/11] IB/srp: Fix a race condition triggered by destroying a queue pair

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/30/14 15:26, Sagi Grimberg wrote:
On 10/30/2014 3:50 PM, Bart Van Assche wrote:
+    /* Destroying a QP and reusing ch->done is only safe if not
connected */
+    WARN_ON_ONCE(target->connected);

I thought we agreed that cannot happen. I guess I don't mind keeping
it... BTW, were you able to reproduce this race as well?

Hello Sagi,

Agreed that it is possible to conclude from the ib_srp source code that the above "WARN_ON_ONCE(target->connected)" statement will never be triggered. The reason I added that statement is to have an explicit check of that condition. Such statements can be helpful in case anyone would like to modify the SRP initiator driver.

I have not yet been able to reproduce the crash addressed by this patch. But the code added via this patch has been triggered in my tests. Since this code is e.g. called from srp_free_ch_ib(), unloading the ib_srp kernel module after login succeeded is sufficient to trigger this code.

Bart.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux