aboutsummaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorJustin Tee <justin.tee@broadcom.com>2023-09-08 14:18:52 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2023-09-13 20:49:34 -0400
commit9c3034968ed0feeaf72e5b549b19c7767a1a04f2 (patch)
tree3c43ec4986d0324efa501403309b7ba4ce2144c0 /net/unix/garbage.c
parent7dcc683db3639eadd11bf0d59a09088a43de5e22 (diff)
scsi: lpfc: Early return after marking final NLP_DROPPED flag in dev_loss_tmo
When a dev_loss_tmo event occurs, an ndlp lock is taken before checking nlp_flag for NLP_DROPPED. There is an attempt to restore the ndlp lock when exiting the if statement, but the nlp_put kref could be the final decrement causing a use-after-free memory access on a released ndlp object. Instead of trying to reacquire the ndlp lock after checking nlp_flag, just return after calling nlp_put. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20230908211852.37576-1-justintee8345@gmail.com Reviewed-by: "Ewan D. Milne" <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions