On Mon, 01 Apr 2024 21:10:38 +0200, Alexander Wetzel wrote:
> commit 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race")
> introduced an incorrect WARN_ON_ONCE() and missed a sequence where
> sg_device_destroy() was used after scsi_device_put().
>
> sg_device_destroy() is accessing the
Alexander,
> commit 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race")
> introduced an incorrect WARN_ON_ONCE() and missed a sequence where
> sg_device_destroy() was used after scsi_device_put().
Applied to 6.9/scsi-fixes, thanks!
--
Martin K. Petersen Oracle Linux Engineering
On 4/1/24 12:10, Alexander Wetzel wrote:
commit 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race")
introduced an incorrect WARN_ON_ONCE() and missed a sequence where
sg_device_destroy() was used after scsi_device_put().
sg_device_destroy() is accessing the parent scsi_device request_queue
On 04.04.24 01:24, Bart Van Assche wrote:
On 4/1/24 12:10 PM, Alexander Wetzel wrote:
@@ -301,11 +302,12 @@ sg_open(struct inode *inode, struct file *filp)
/* This driver's module count bumped by fops_get in */
/* Prevent the device driver from vanishing while we sleep */
-
On 4/1/24 12:10 PM, Alexander Wetzel wrote:
@@ -301,11 +302,12 @@ sg_open(struct inode *inode, struct file *filp)
/* This driver's module count bumped by fops_get in */
/* Prevent the device driver from vanishing while we sleep */
- retval = scsi_device_get(sdp->device);
+
> On 2 Apr 2024, at 12:40 AM, Alexander Wetzel wrote:
>
> commit 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race")
> introduced an incorrect WARN_ON_ONCE() and missed a sequence where
> sg_device_destroy() was used after scsi_device_put().
>
> sg_device_destroy() is accessing the
commit 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race")
introduced an incorrect WARN_ON_ONCE() and missed a sequence where
sg_device_destroy() was used after scsi_device_put().
sg_device_destroy() is accessing the parent scsi_device request_queue which
will already be set to NULL when the