aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorDamien Le Moal <[email protected]>2024-04-12 08:41:15 +0900
committerDamien Le Moal <[email protected]>2024-04-13 09:06:34 +0900
commit79336504781e7fee5ddaf046dcc186c8dfdf60b1 (patch)
tree82b545d3b79cf23fe02419a4a1994f93a2578e64 /scripts/gdb/linux/utils.py
parent24cfd86433c920188ac3f02df8aba6bc4c792f4b (diff)
ata: libata-scsi: Fix ata_scsi_dev_rescan() error path
Commit 0c76106cb975 ("scsi: sd: Fix TCG OPAL unlock on system resume") incorrectly handles failures of scsi_resume_device() in ata_scsi_dev_rescan(), leading to a double call to spin_unlock_irqrestore() to unlock a device port. Fix this by redefining the goto labels used in case of errors and only unlock the port scsi_scan_mutex when scsi_resume_device() fails. Bug found with the Smatch static checker warning: drivers/ata/libata-scsi.c:4774 ata_scsi_dev_rescan() error: double unlocked 'ap->lock' (orig line 4757) Reported-by: Dan Carpenter <[email protected]> Fixes: 0c76106cb975 ("scsi: sd: Fix TCG OPAL unlock on system resume") Cc: [email protected] Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Niklas Cassel <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions