summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2025-02-10 12:39:36 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2025-02-18 21:36:08 -0500
commit38afcf0660f5c408ba6c2f0ba3a9729e0102fe2e (patch)
tree97eac6913dfe4dc223d82b239b907ecd173e38f5 /tools/perf/scripts/python/export-to-postgresql.py
parentc733741ae1c3a5927f72664b0d760d5f4c14f96b (diff)
scsi: mpt3sas: Fix a locking bug in an error path
Call mutex_unlock(&ioc->hostdiag_unlock_mutex) once from error paths instead of twice. This patch fixes the following Clang -Wthread-safety errors: drivers/scsi/mpt3sas/mpt3sas_base.c:8085:2: error: mutex 'ioc->hostdiag_unlock_mutex' is not held on every path through here [-Werror,-Wthread-safety-analysis] 8085 | pci_cfg_access_unlock(ioc->pdev); | ^ drivers/scsi/mpt3sas/mpt3sas_base.c:8019:2: note: mutex acquired here 8019 | mutex_lock(&ioc->hostdiag_unlock_mutex); | ^ ./include/linux/mutex.h:171:26: note: expanded from macro 'mutex_lock' 171 | #define mutex_lock(lock) mutex_lock_nested(lock, 0) | ^ drivers/scsi/mpt3sas/mpt3sas_base.c:8085:2: error: mutex 'ioc->hostdiag_unlock_mutex' is not held on every path through here [-Werror,-Wthread-safety-analysis] 8085 | pci_cfg_access_unlock(ioc->pdev); | ^ drivers/scsi/mpt3sas/mpt3sas_base.c:8019:2: note: mutex acquired here 8019 | mutex_lock(&ioc->hostdiag_unlock_mutex); | ^ ./include/linux/mutex.h:171:26: note: expanded from macro 'mutex_lock' 171 | #define mutex_lock(lock) mutex_lock_nested(lock, 0) | ^ drivers/scsi/mpt3sas/mpt3sas_base.c:8087:2: error: releasing mutex 'ioc->hostdiag_unlock_mutex' that was not held [-Werror,-Wthread-safety-analysis] 8087 | mutex_unlock(&ioc->hostdiag_unlock_mutex); | ^ Cc: Ranjan Kumar <ranjan.kumar@broadcom.com> Fixes: c0767560b012 ("scsi: mpt3sas: Reload SBR without rebooting HBA") Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20250210203936.2946494-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions