linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Bart Van Assche <bart.vanassche@sandisk.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>, Ewan Milne <emilne@redhat.com>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] libfc: replace 'rp_mutex' with 'rp_lock'
Date: Wed, 11 May 2016 07:49:25 +0200	[thread overview]
Message-ID: <5732C7E5.3000709@suse.de> (raw)
In-Reply-To: <57322963.7040507@sandisk.com>

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@suse.de			               +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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-05-11  5:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25  8:01 [PATCH] libfc: replace 'rp_mutex' with 'rp_lock' Hannes Reinecke
2016-04-25 20:26 ` Ewan D. Milne
2016-05-09 12:29 ` Johannes Thumshirn
2016-05-10 18:33 ` Bart Van Assche
2016-05-11  1:48   ` Martin K. Petersen
2016-05-11  5:49   ` Hannes Reinecke [this message]
2016-05-11  6:07     ` Hannes Reinecke
2016-05-11 14:44       ` Bart Van Assche
2016-05-17  6:46         ` Hannes Reinecke
2016-05-17 18:04           ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5732C7E5.3000709@suse.de \
    --to=hare@suse.de \
    --cc=bart.vanassche@sandisk.com \
    --cc=emilne@redhat.com \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).