Message ID | 20220303205946.1609-1-dossche.niels@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] scsi: aacraid: add missing manage_lock on management_fib_count | expand |
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c index 11ef58204e96..ca73439587ed 100644 --- a/drivers/scsi/aacraid/src.c +++ b/drivers/scsi/aacraid/src.c @@ -91,7 +91,9 @@ static irqreturn_t aac_src_intr_message(int irq, void *dev_id) dev->sync_fib); spin_lock_irqsave(&dev->sync_fib->event_lock, sflags); if (dev->sync_fib->flags & FIB_CONTEXT_FLAG_WAIT) { + spin_lock(&dev->manage_lock); dev->management_fib_count--; + spin_unlock(&dev->manage_lock); complete(&dev->sync_fib->event_wait); } spin_unlock_irqrestore(&dev->sync_fib->event_lock,
All other places modify the management_fib_count under the manage_lock. Avoid a possible race condition by also applying that lock in aac_src_intr_message. Signed-off-by: Niels Dossche <dossche.niels@gmail.com> --- Changes in v3: - Improve commit message. Changes in v2: - Fix whitespace. drivers/scsi/aacraid/src.c | 2 ++ 1 file changed, 2 insertions(+)