Skip to contentSkip to conversation

scsi: elx: libefc: fix IRQ restore in efc_domain_dispatch_frame()

PATCH Applied Dan Carpenter 3 participants 3 messages Jun 18, 2021 – Jun 19, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: elx: libefc: fix IRQ restore in efc_domain_dispatch_frame()

Calling a nested spin_lock_irqsave() will overwrite the original "flags" so that they can not be enabled again at the end.

Fixes 3146240f19bf ("scsi: elx: libefc: FC Domain state machine interfaces")
---
 drivers/scsi/elx/libefc/efc_domain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/elx/libefc/efc_domain.c +2 -2
index 0c08fa2066b9..ca9d7ff2c0d2 100644
@@ -1001,10 +1001,10 @@ efc_domain_dispatch_frame(void *arg, struct efc_hw_sequence *seq)
 
 	if (node->hold_frames || !list_empty(&node->pend_frames)) {
 		/* add frame to node's pending list */
-		spin_lock_irqsave(&node->pend_frames_lock, flags);
+		spin_lock(&node->pend_frames_lock);
 		INIT_LIST_HEAD(&seq->list_entry);
 		list_add_tail(&seq->list_entry, &node->pend_frames);
-		spin_unlock_irqrestore(&node->pend_frames_lock, flags);
+		spin_unlock(&node->pend_frames_lock);
 		rc = EFC_HW_SEQ_HOLD;
 		goto out_release;
 	}
Signature · 1 line
2.30.2
#1 lore raw

Dan,

Quoted 2 lines

Calling a nested spin_lock_irqsave() will overwrite the original "flags" so that they can not be enabled again at the end.

Applied to 5.14/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
Reviewed-by on v1 1/1
#2 lore raw
In reply to Dan Carpenter
Quoted 8 lines · Dan Carpenter

Calling a nested spin_lock_irqsave() will overwrite the original "flags" so that they can not be enabled again at the end.

Fixes 3146240f19bf ("scsi: elx: libefc: FC Domain state machine interfaces")
---
  drivers/scsi/elx/libefc/efc_domain.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks!

-- james