From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "jack@suse.cz" <jack@suse.cz>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"scott.bauer@intel.com" <scott.bauer@intel.com>,
"hch@lst.de" <hch@lst.de>, "hare@suse.com" <hare@suse.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] Avoid that scsi_exit_rq() triggers a use-after-free
Date: Wed, 3 May 2017 16:18:03 +0000 [thread overview]
Message-ID: <1493828282.3901.9.camel@sandisk.com> (raw)
In-Reply-To: <20170503075416.GA10084@quack2.suse.cz>
On Wed, 2017-05-03 at 09:54 +0200, Jan Kara wrote:
> Hum, since this didn't quite work out, how about storing that one bit of
> information that scsi_exit_rq() needs from shost inside scsi_cmnd during
> scsi_init_rq()?
Hello Jan,
All what's missing from the patch I posted is a execute_in_process_context()
scsi_host_dev_release() call execute in a context where sleeping is allowed.
What you proposed is something I had considered but that I had not yet tried
to implement because it requires more changes. Anyway, I'll give that approach
a try since it does not require to introduce a new work_struct.
Bart.
prev parent reply other threads:[~2017-05-03 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-02 17:43 [PATCH] Avoid that scsi_exit_rq() triggers a use-after-free Bart Van Assche
2017-05-02 17:43 ` Bart Van Assche
2017-05-02 23:00 ` Scott Bauer
2017-05-03 16:12 ` Bart Van Assche
2017-05-03 7:54 ` Jan Kara
2017-05-03 16:18 ` Bart Van Assche [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=1493828282.3901.9.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=scott.bauer@intel.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 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.