scsi: ipr: Error path locking fixes
authorBrian King <brking@linux.vnet.ibm.com>
Wed, 15 Mar 2017 21:58:39 +0000 (16:58 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 23 Mar 2017 16:04:05 +0000 (12:04 -0400)
commitf646f325a829d73abc708088d2b67cd11b775fdf
treeac7621db104d1a6d1d4260116f77e8ea21723bd1
parent439ae285b9d9da12343e3d51a0dff1b473a6a6ac
scsi: ipr: Error path locking fixes

This patch closes up some potential race conditions observed in the
error handling paths in ipr while debugging an issue resulting in a hang
with SATA error handling. These patches ensure we are holding the
correct lock when adding and removing commands from the free and pending
queues in some error scenarios.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Reviewed-by: Wendy Xiong <wenxiong@linux.vnet.ibm.com>
Tested-by: Wendy Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ipr.c