Skip to content

Commit

Permalink
scsi: elx: libefc: Fix IRQ restore in efc_domain_dispatch_frame()
Browse files Browse the repository at this point in the history
Calling a nested spin_lock_irqsave() will overwrite the original "flags" so
that they can not be enabled again at the end.

Link: https://lore.kernel.org/r/YMyjH16k4M1yEmmU@mwanda
Fixes: 3146240 ("scsi: elx: libefc: FC Domain state machine interfaces")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Dan Carpenter authored and Martin K. Petersen committed Jun 19, 2021
1 parent 99cf922 commit 7cca85d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/elx/libefc/efc_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7cca85d

Please sign in to comment.