Patch "scsi: core: Fix a procfs host directory removal regression" has been added to the 5.4-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: core: Fix a procfs host directory removal regression

to the 5.4-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-core-fix-a-procfs-host-directory-removal-regres.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 37249dcd49fece1460feb6bbf014751ac2b5e70c
Author: Bart Van Assche <bvanassche@xxxxxxx>
Date:   Tue Mar 7 13:44:28 2023 -0800

    scsi: core: Fix a procfs host directory removal regression
    
    [ Upstream commit be03df3d4bfe7e8866d4aa43d62e648ffe884f5f ]
    
    scsi_proc_hostdir_rm() decreases a reference counter and hence must only be
    called once per host that is removed. This change does not require a
    scsi_add_host_with_dma() change since scsi_add_host_with_dma() will return
    0 (success) if scsi_proc_host_add() is called.
    
    Fixes: fc663711b944 ("scsi: core: Remove the /proc/scsi/${proc_name} directory earlier")
    Cc: John Garry <john.g.garry@xxxxxxxxxx>
    Reported-by: John Garry <john.g.garry@xxxxxxxxxx>
    Link: https://lore.kernel.org/all/ed6b8027-a9d9-1b45-be8e-df4e8c6c4605@xxxxxxxxxx/
    Reported-by: syzbot+645a4616b87a2f10e398@xxxxxxxxxxxxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/linux-scsi/000000000000890fab05f65342b6@xxxxxxxxxx/
    Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
    Link: https://lore.kernel.org/r/20230307214428.3703498-1-bvanassche@xxxxxxx
    Tested-by: John Garry <john.g.garry@xxxxxxxxxx>
    Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index d3a63961b98a9..b97e046c6a6e1 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -319,9 +319,6 @@ static void scsi_host_dev_release(struct device *dev)
 	struct Scsi_Host *shost = dev_to_shost(dev);
 	struct device *parent = dev->parent;
 
-	/* In case scsi_remove_host() has not been called. */
-	scsi_proc_hostdir_rm(shost->hostt);
-
 	/* Wait for functions invoked through call_rcu(&scmd->rcu, ...) */
 	rcu_barrier();
 



[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