On 05/10/2016 08:33 PM, Bart Van Assche wrote: > On 04/25/2016 01:01 AM, Hannes Reinecke wrote: >> We cannot use an embedded mutex in a structure with reference >> counting, as mutex unlock might be delayed, and the waiters >> might then access an already freed memory area. >> So convert it to a spinlock. >> >> For details cf https://lkml.org/lkml/2015/2/11/245 > > Hello Hannes, > > Is what you describe a theoretical concern or have you observed any > issues that could have been caused by the rport mutex? I'm asking > this because my interpretation of the thread you refer to is > different. My conclusion is that it is safe to embed a mutex in a > structure that uses reference counting but that the mutex_unlock() > call may trigger a spurious wakeup. I think that the conclusion of > that thread was that glibc and kernel code should tolerate such > spurious wakeups. > We have several bugzillas referring to that specific code. Most notably triggered when removing target ports with and open-fcoe HBA. And this patch seems to resolve it. Read: with this patch the issue doesn't occur anymore. Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html