[PATCH v3] scsi: sg: Avoid race in error handling & drop bogus warn

Bart Van Assche bvanassche at acm.org
Thu Apr 4 10:24:30 AEDT 2024


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 <linux/fs.h> */
>   	/* Prevent the device driver from vanishing while we sleep */
> -	retval = scsi_device_get(sdp->device);
> +	device = sdp->device;
> +	retval = scsi_device_get(device);
>   	if (retval)
>   		goto sg_put;

Are all the sdp->device -> device changes essential? Isn't there a
preference to minimize patches that will end up in the stable trees?

Thanks,

Bart.


More information about the Linuxppc-dev mailing list