This is a note to let you know that I've just added the patch titled mmc: hsq: Fix data stomping during mmc recovery to the 5.19-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: mmc-hsq-fix-data-stomping-during-mmc-recovery.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e7afa79a3b35a27a046a2139f8b20bd6b98155c2 Mon Sep 17 00:00:00 2001 From: Wenchao Chen <wenchao.chen@xxxxxxxxxx> Date: Fri, 16 Sep 2022 17:05:06 +0800 Subject: mmc: hsq: Fix data stomping during mmc recovery From: Wenchao Chen <wenchao.chen@xxxxxxxxxx> commit e7afa79a3b35a27a046a2139f8b20bd6b98155c2 upstream. The block device uses multiple queues to access emmc. There will be up to 3 requests in the hsq of the host. The current code will check whether there is a request doing recovery before entering the queue, but it will not check whether there is a request when the lock is issued. The request is in recovery mode. If there is a request in recovery, then a read and write request is initiated at this time, and the conflict between the request and the recovery request will cause the data to be trampled. Signed-off-by: Wenchao Chen <wenchao.chen@xxxxxxxxxx> Fixes: 511ce378e16f ("mmc: Add MMC host software queue support") Cc: stable@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/r/20220916090506.10662-1-wenchao.chen666@xxxxxxxxx Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mmc/host/mmc_hsq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mmc/host/mmc_hsq.c +++ b/drivers/mmc/host/mmc_hsq.c @@ -34,7 +34,7 @@ static void mmc_hsq_pump_requests(struct spin_lock_irqsave(&hsq->lock, flags); /* Make sure we are not already running a request now */ - if (hsq->mrq) { + if (hsq->mrq || hsq->recovery_halt) { spin_unlock_irqrestore(&hsq->lock, flags); return; } Patches currently in stable-queue which might be from wenchao.chen@xxxxxxxxxx are queue-5.19/mmc-hsq-fix-data-stomping-during-mmc-recovery.patch