diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-08-15 14:29:05 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-08-22 21:08:44 -0400 |
commit | 2e4b02fad094976763af08fec2c620f4f8edd9ae (patch) | |
tree | d976acbcc532fcae5a85ca2c762cd419301fab99 /arch/sparc | |
parent | 89835a58f5f54d52537709f2513fb91024e2d069 (diff) |
scsi: elx: libefc: Fix potential use after free in efc_nport_vport_del()
The kref_put() function will call nport->release if the refcount drops to
zero. The nport->release release function is _efc_nport_free() which frees
"nport". But then we dereference "nport" on the next line which is a use
after free. Re-order these lines to avoid the use after free.
Fixes: fcd427303eb9 ("scsi: elx: libefc: SLI and FC PORT state machine interfaces")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/b666ab26-6581-4213-9a3d-32a9147f0399@stanley.mountain
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'arch/sparc')
0 files changed, 0 insertions, 0 deletions