From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Stable <stable@vger.kernel.org>, Christoph Hellwig <hch@lst.de>,
Hannes Reinecke <hare@suse.com>,
"Ewan D . Milne" <emilne@redhat.com>
Subject: Re: [PATCH V2] scsi: fix race on creating sense cache
Date: Tue, 16 Jul 2019 22:43:42 -0400 [thread overview]
Message-ID: <yq1blxtz8gx.fsf@oracle.com> (raw)
In-Reply-To: <20190712020819.31935-1-ming.lei@redhat.com> (Ming Lei's message of "Fri, 12 Jul 2019 10:08:19 +0800")
Ming,
> When scsi_init_sense_cache(host) is called concurrently from different
> hosts, each code path may see that the cache isn't created, then try
> to create a new one, then the created sense cache may be overrided and
> leaked.
>
> Fixes the issue by moving 'mutex_lock(&scsi_sense_cache_mutex)' before
> scsi_select_sense_cache().
Applied to 5.3/scsi-fixes, thanks!
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2019-07-17 2:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-12 2:08 [PATCH V2] scsi: fix race on creating sense cache Ming Lei
2019-07-17 2:43 ` 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=yq1blxtz8gx.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=emilne@redhat.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=stable@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 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).