From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
Bart van Assche <bart.vanassche@sandisk.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCHv2] libfc: Update rport reference counting
Date: Tue, 14 Jun 2016 21:10:00 -0400 [thread overview]
Message-ID: <yq1bn33cl5j.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <1464070318-69866-1-git-send-email-hare@suse.de> (Hannes Reinecke's message of "Tue, 24 May 2016 08:11:58 +0200")
>>>>> "Hannes" == Hannes Reinecke <hare@suse.de> writes:
Hannes> Originally libfc would just be initializing the refcount to '1',
Hannes> and using the disc_mutex to synchronize if and when the final
Hannes> put should be happening. This has a race condition as the mutex
Hannes> might be delayed, causing other threads to access an invalid
Hannes> structure. This patch updates the rport reference counting to
Hannes> increase the reference every time 'rport_lookup' is called, and
Hannes> decreases the reference correspondingly. This removes the need
Hannes> to hold 'disc_mutex' when removing the structure, and avoids the
Hannes> above race condition.
Applied to 4.8/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2016-06-15 1:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 6:11 [PATCHv2] libfc: Update rport reference counting Hannes Reinecke
2016-05-24 16:39 ` Vasu Dev
2016-06-14 10:20 ` Johannes Thumshirn
2016-06-15 1:10 ` Martin K. Petersen [this message]
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=yq1bn33cl5j.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=bart.vanassche@sandisk.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.