scsi: sg: close race condition in sg_remove_sfp_usercontext()
authorHannes Reinecke <hare@suse.de>
Fri, 7 Apr 2017 07:34:17 +0000 (09:34 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Apr 2017 00:55:20 +0000 (20:55 -0400)
commit97d27b0dd015e980ade63fda111fd1353276e28b
tree73d20113d2a708816b6194c0519431db1e792700
parent109bade9c625c89bb5ea753aaa1a0a97e6fbb548
scsi: sg: close race condition in sg_remove_sfp_usercontext()

sg_remove_sfp_usercontext() is clearing any sg requests, but needs to
take 'rq_list_lock' when modifying the list.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Tested-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sg.c