diff options
author | Alexander Wetzel <[email protected]> | 2024-03-20 22:30:32 +0100 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2024-03-25 15:41:07 -0400 |
commit | 27f58c04a8f438078583041468ec60597841284d (patch) | |
tree | b577c903f5887be0875f9bc597ab4efaa96c18ee /lib/memory-notifier-error-inject.c | |
parent | f02fe780f28db435671fcc7c0214556e253b5a46 (diff) |
scsi: sg: Avoid sg device teardown race
sg_remove_sfp_usercontext() must not use sg_device_destroy() after calling
scsi_device_put().
sg_device_destroy() is accessing the parent scsi_device request_queue which
will already be set to NULL when the preceding call to scsi_device_put()
removed the last reference to the parent scsi_device.
The resulting NULL pointer exception will then crash the kernel.
Link: https://lore.kernel.org/r/[email protected]
Fixes: db59133e9279 ("scsi: sg: fix blktrace debugfs entries leakage")
Cc: [email protected]
Signed-off-by: Alexander Wetzel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions