Patch "scsi: sd: Don't call blk_cleanup_disk() in sd_probe()" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: sd: Don't call blk_cleanup_disk() in sd_probe()

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-sd-don-t-call-blk_cleanup_disk-in-sd_probe.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fbb6500c87883ed1cb701fa02741cf79c2798db3
Author: Christoph Hellwig <hch@xxxxxx>
Date:   Mon May 23 10:38:13 2022 +0200

    scsi: sd: Don't call blk_cleanup_disk() in sd_probe()
    
    [ Upstream commit 7274ce0558adb4b9b1f5c5b613fb4fe331c18911 ]
    
    In SCSI the midlayer has ownership of the request_queue, so on probe
    failure we must only put the gendisk, but leave the request_queue alone.
    
    Link: https://lore.kernel.org/r/20220523083813.227935-1-hch@xxxxxx
    Fixes: 03252259e18e ("scsi: sd: Clean up gendisk if device_add_disk() failed")
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index dc6e55761fd1..5539d75dcfe7 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3475,7 +3475,7 @@ static int sd_probe(struct device *dev)
 	error = device_add_disk(dev, gd, NULL);
 	if (error) {
 		put_device(&sdkp->disk_dev);
-		blk_cleanup_disk(gd);
+		put_disk(gd);
 		goto out;
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux