diff options
author | Alexander Wetzel <Alexander@wetzel-home.de> | 2024-03-20 22:30:32 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-03-25 15:41:07 -0400 |
commit | 27f58c04a8f438078583041468ec60597841284d (patch) | |
tree | b577c903f5887be0875f9bc597ab4efaa96c18ee /fs/statfs.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/20240305150509.23896-1-Alexander@wetzel-home.de
Fixes: db59133e9279 ("scsi: sg: fix blktrace debugfs entries leakage")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Wetzel <Alexander@wetzel-home.de>
Link: https://lore.kernel.org/r/20240320213032.18221-1-Alexander@wetzel-home.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'fs/statfs.c')
0 files changed, 0 insertions, 0 deletions