diff options
author | James Bottomley <James.Bottomley@suse.de> | 2011-01-27 22:12:37 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-12 17:17:13 +0100 |
commit | 563585ec4bf1319f193c2f51682985bcae400cb4 (patch) | |
tree | de6d2b98f972fc9a414c5d39638c5c0bc3c4a09a /drivers/scsi/qla2xxx/qla_attr.c | |
parent | Merge branch 'kvm-updates/2.6.38' of git://git.kernel.org/pub/scm/virt/kvm/kvm (diff) | |
download | linux-563585ec4bf1319f193c2f51682985bcae400cb4.tar.xz linux-563585ec4bf1319f193c2f51682985bcae400cb4.zip |
[SCSI] qla2xxx: Fix race that could hang kthread_stop()
There is a small race window in qla2x00_do_dpc() between
checking for kthread_should_stop() and going to sleep after
setting TASK_INTERRUPTIBLE. If qla2x00_free_device() is called
in this window, kthread_stop will wait forever because there
will be no one to wake up the process.
Fix by making sure we only set TASK_INTERRUPTIBLE before checking
kthread_stop().
Reported-by: Bandan Das <bandan.das@stratus.com>
Acked-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
0 files changed, 0 insertions, 0 deletions