From: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
To: "Martin K. Petersen"
<martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: Mike Christie <michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>,
Elric Fu <elricfu1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
James Bottomley
<JBottomley-MU7nAjRaF3makBO8gow8eQ@public.gmane.org>,
linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Sarah Sharp
<sarah.a.sharp-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
Alex He <alex.he-5C7GfCeVMHo@public.gmane.org>,
Andiry Xu <andiry.xu-5C7GfCeVMHo@public.gmane.org>,
Greg KH
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Linux USB Mailing List
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Alan Stern
<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Subject: Re: An oops will occur while SCSI core is being used in 3.4-rc1
Date: Wed, 11 Apr 2012 20:01:22 +0000 [thread overview]
Message-ID: <4F85E312.6070205@acm.org> (raw)
In-Reply-To: <4F85B3E8.7040704-HInyCGIudOg@public.gmane.org>
On 04/11/12 16:40, Bart Van Assche wrote:
> On 04/11/12 16:10, Martin K. Petersen wrote:
>> index 377df4a..1e11985 100644
>> --- a/include/scsi/scsi_cmnd.h
>> +++ b/include/scsi/scsi_cmnd.h
>> @@ -134,6 +134,9 @@ struct scsi_cmnd {
>>
>> static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
>> {
>> + if (!cmd->request->rq_disk)
>> + return NULL;
>> +
>> return *(struct scsi_driver **)cmd->request->rq_disk->private_data;
>> }
>
> What if the rq_disk pointer is cleared by another kernel thread after it
> has been checked but before it is used ?
(replying to my own e-mail)
That comment didn't make sense - request.rq_disk is not modified after
it has been initialized. Yet it would make me more happy if
scsi_send_eh_cmnd() could be modified such that it doesn't have to
access struct scsi_driver.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-04-11 20:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 1:22 An oops will occur while SCSI core is being used in 3.4-rc1 Elric Fu
2012-04-10 8:16 ` Bart Van Assche
2012-04-10 16:37 ` Mike Christie
[not found] ` <4F8461E3.3050808-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2012-04-10 16:45 ` Mike Christie
2012-04-10 16:51 ` Mike Christie
2012-04-11 16:10 ` Martin K. Petersen
2012-04-11 16:40 ` Bart Van Assche
[not found] ` <4F85B3E8.7040704-HInyCGIudOg@public.gmane.org>
2012-04-11 20:01 ` Bart Van Assche [this message]
[not found] ` <4F85E312.6070205-HInyCGIudOg@public.gmane.org>
2012-04-12 0:48 ` Martin K. Petersen
2012-04-18 7:53 ` James Bottomley
2012-04-13 0:30 ` Rustad, Mark D
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=4F85E312.6070205@acm.org \
--to=bvanassche-hinycgiudog@public.gmane.org \
--cc=JBottomley-MU7nAjRaF3makBO8gow8eQ@public.gmane.org \
--cc=alex.he-5C7GfCeVMHo@public.gmane.org \
--cc=andiry.xu-5C7GfCeVMHo@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=elricfu1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org \
--cc=sarah.a.sharp-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.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