summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2011-03-11 00:13:18 +0100
committerJames Bottomley <James.Bottomley@suse.de>2011-03-15 00:46:25 +0100
commita82058a730c2bd01c43beb8a4847526a2998cc1a (patch)
tree92608d5ecc6e70976fb320fe0c48074b5e0e5a01 /drivers/scsi/scsi_debug.c
parent[SCSI] hpsa: export resettable host attribute (diff)
downloadlinux-a82058a730c2bd01c43beb8a4847526a2998cc1a.tar.xz
linux-a82058a730c2bd01c43beb8a4847526a2998cc1a.zip
[SCSI] libsas: fix ata list corruption issue
I think this stems from a misunderstanding of how the ata error handler works. ata_scsi_cmd_error_handler() gets called with a passed in list of commands to handle. However, that list may still not be empty when it exits. The command ata_scsi_port_error_handler() must be called (which takes no list) before the list will be completely emptied. This bites the sas error handler because the two are called from different functions and the original list has gone out of scope before ata_scsi_port_error_handler() is called. leading to some commands dangling on bare stack, which is a potential memory corruption issue. Fix this by manually deleting all outstanding commands from the on-stack list before it goes out of scope. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
0 files changed, 0 insertions, 0 deletions