diff mbox series

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

Message ID YMyjH16k4M1yEmmU@mwanda (mailing list archive)
State Accepted
Commit 7cca85dff2d2a67836ecb2f4bf6466bc5080e007
Headers show
Series scsi: elx: libefc: fix IRQ restore in efc_domain_dispatch_frame() | expand

Commit Message

Dan Carpenter June 18, 2021, 1:43 p.m. UTC
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")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/scsi/elx/libefc/efc_domain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Martin K. Petersen June 19, 2021, 2:44 a.m. UTC | #1
Dan,

> 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!
James Smart June 19, 2021, 3:44 p.m. UTC | #2
On 6/18/2021 6:43 AM, Dan Carpenter wrote:
> 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")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>   drivers/scsi/elx/libefc/efc_domain.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Thanks!

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james
diff mbox series

Patch

diff --git a/drivers/scsi/elx/libefc/efc_domain.c b/drivers/scsi/elx/libefc/efc_domain.c
index 0c08fa2066b9..ca9d7ff2c0d2 100644
--- a/drivers/scsi/elx/libefc/efc_domain.c
+++ b/drivers/scsi/elx/libefc/efc_domain.c
@@ -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;
 	}