Patch "libata: fix ata_host_start()" has been added to the 5.14-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

    libata: fix ata_host_start()

to the 5.14-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:
     libata-fix-ata_host_start.patch
and it can be found in the queue-5.14 subdirectory.

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



commit 785914f9e4718a052dc6bac3087e40be978e1594
Author: Damien Le Moal <damien.lemoal@xxxxxxx>
Date:   Mon Aug 16 10:44:47 2021 +0900

    libata: fix ata_host_start()
    
    [ Upstream commit 355a8031dc174450ccad2a61c513ad7222d87a97 ]
    
    The loop on entry of ata_host_start() may not initialize host->ops to a
    non NULL value. The test on the host_stop field of host->ops must then
    be preceded by a check that host->ops is not NULL.
    
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
    Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
    Link: https://lore.kernel.org/r/20210816014456.2191776-3-damien.lemoal@xxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 61c762961ca8..44f434acfce0 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5573,7 +5573,7 @@ int ata_host_start(struct ata_host *host)
 			have_stop = 1;
 	}
 
-	if (host->ops->host_stop)
+	if (host->ops && host->ops->host_stop)
 		have_stop = 1;
 
 	if (have_stop) {



[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