* scsi_requeue_command and dropping reference to sdev_gendev
@ 2012-07-24 4:13 Ani Sinha
2012-07-24 5:09 ` James Bottomley
0 siblings, 1 reply; 3+ messages in thread
From: Ani Sinha @ 2012-07-24 4:13 UTC (permalink / raw)
To: linux-scsi; +Cc: Francesco Ruggeri
Hi :
I am looking at the latest upstream code and I see a potential issue :
- scsi_requeue_command() drops reference to scsi_device->sdev_gendev in
scsi_unprep_request->scsi_put_command()->__scsi_put_command(). This can
trigger the cleanup routine scsi_device_dev_release_usercontext() that
will deallocate the sdev->request_queue in blk_put_queue() call. This can
cause potential problems in scsi_requeue_command() when it calls
scsi_run_queue().
Am I missing something here?
Any suggestion will be greatly appreciated.
Thanks,
Ani
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: scsi_requeue_command and dropping reference to sdev_gendev
2012-07-24 4:13 scsi_requeue_command and dropping reference to sdev_gendev Ani Sinha
@ 2012-07-24 5:09 ` James Bottomley
2012-07-24 17:29 ` Ani Sinha
0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2012-07-24 5:09 UTC (permalink / raw)
To: Ani Sinha; +Cc: linux-scsi, Francesco Ruggeri
On Mon, 2012-07-23 at 21:13 -0700, Ani Sinha wrote:
> Hi :
>
> I am looking at the latest upstream code and I see a potential issue :
>
> - scsi_requeue_command() drops reference to scsi_device->sdev_gendev in
> scsi_unprep_request->scsi_put_command()->__scsi_put_command(). This can
> trigger the cleanup routine scsi_device_dev_release_usercontext() that
> will deallocate the sdev->request_queue in blk_put_queue() call. This can
> cause potential problems in scsi_requeue_command() when it calls
> scsi_run_queue().
>
> Am I missing something here?
>
> Any suggestion will be greatly appreciated.
commit 940f5d47e2f2e1fa00443921a0abf4822335b54d
Author: Bart Van Assche <bvanassche@acm.org>
Date: Fri Jun 29 15:34:26 2012 +0000
[SCSI] Avoid dangling pointer in scsi_requeue_command()
James
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: scsi_requeue_command and dropping reference to sdev_gendev
2012-07-24 5:09 ` James Bottomley
@ 2012-07-24 17:29 ` Ani Sinha
0 siblings, 0 replies; 3+ messages in thread
From: Ani Sinha @ 2012-07-24 17:29 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi, Francesco Ruggeri
>
> commit 940f5d47e2f2e1fa00443921a0abf4822335b54d
> Author: Bart Van Assche <bvanassche@acm.org>
> Date: Fri Jun 29 15:34:26 2012 +0000
>
> [SCSI] Avoid dangling pointer in scsi_requeue_command()
>
> James
Thanks James. We have been only looking at Torvalds' tree and I think this
fix hasn't been pulled in yet. Your pointer is much appreciated.
Cheers,
Ani
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-24 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-24 4:13 scsi_requeue_command and dropping reference to sdev_gendev Ani Sinha
2012-07-24 5:09 ` James Bottomley
2012-07-24 17:29 ` Ani Sinha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox