]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: restart list search after unlock in scsi_remove_target
authorChristoph Hellwig <hch@lst.de>
Mon, 19 Oct 2015 14:35:46 +0000 (16:35 +0200)
committerJames Bottomley <JBottomley@Odin.com>
Thu, 5 Nov 2015 17:24:14 +0000 (09:24 -0800)
commit2b34146a2c7b8f3b061e3f2b34d02502494cfb6b
tree2774230419725a5e8ed66c28c00c5ef974112590
parente34129201dae5e1c103e942b316397f35352f1b1
scsi: restart list search after unlock in scsi_remove_target

When dropping a lock while iterating a list we must restart the search
as other threads could have manipulated the list under us.  Without this
we can get stuck in an endless loop.  This bug was introduced by

commit cead6509235025199b39e85cdcde68a2474152cb
Author: Dan Williams <djbw@fb.com>
Date:   Tue Aug 28 22:12:10 2012 -0700

    [SCSI] scsi_remove_target: fix softlockup regression on hot remove

Which was itself trying to fix a reported soft lockup issue

http://thread.gmane.org/gmane.linux.kernel/1348679

However, we believe even with this revert of the original patch, the soft
lockup problem has been fixed by

commit 8eefc40995ebc64c25661849b8bdda82de3c06f8
Author: James Bottomley <JBottomley@Parallels.com>
Date:   Tue Jan 21 07:01:41 2014 -0800

    [SCSI] dual scan thread bug fix

Thanks go to Dan Williams <dan.j.williams@intel.com> for tracking all this
prior history down.

Reported-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Fixes: cead6509235025199b39e85cdcde68a2474152cb
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/scsi_sysfs.c