diff options
| author | Justin Tee <[email protected]> | 2023-09-08 21:18:52 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2023-09-14 00:49:34 +0000 |
| commit | 9c3034968ed0feeaf72e5b549b19c7767a1a04f2 (patch) | |
| tree | 3c43ec4986d0324efa501403309b7ba4ce2144c0 /tools/testing/selftests/bpf/progs/recvmsg_unix_prog.c | |
| parent | scsi: lpfc: Fix the NULL vs IS_ERR() bug for debugfs_create_file() (diff) | |
| download | kernel-9c3034968ed0feeaf72e5b549b19c7767a1a04f2.tar.gz kernel-9c3034968ed0feeaf72e5b549b19c7767a1a04f2.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: "Ewan D. Milne" <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/recvmsg_unix_prog.c')
0 files changed, 0 insertions, 0 deletions
