[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <490cdc50-737a-ff64-f21a-23dd59153cbc@intel.com>
Date: Sat, 8 Oct 2022 14:31:34 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Christian Löhle <CLoehle@...erstone.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Linux MMC List <linux-mmc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv2 2/2] mmc: queue: Cancel recovery work on cleanup
On 7/10/22 18:43, Christian Löhle wrote:
> To prevent any recovery work running after the queue cleanup cancel it.
> Any recovery running post-cleanup dereferenced mq->card as NULL
> and was not meaningful to begin with.
>
> Cc: stable@...r.kernel.org
>
> Signed-off-by: Christian Loehle <cloehle@...erstone.com>
Acked-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
> -v2: Use cancel instead of flush
>
> drivers/mmc/core/queue.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
> index fefaa901b50f..86be55d7cf55 100644
> --- a/drivers/mmc/core/queue.c
> +++ b/drivers/mmc/core/queue.c
> @@ -493,6 +493,13 @@ void mmc_cleanup_queue(struct mmc_queue *mq)
> if (blk_queue_quiesced(q))
> blk_mq_unquiesce_queue(q);
>
> + /*
> + * If the recovery completes the last (and only remaining) request in
> + * the queue, and the card has been removed, we could end up here with
> + * the recovery not quite finished yet, so cancel it.
> + */
> + cancel_work_sync(&mq->recovery_work);
> +
> blk_mq_free_tag_set(&mq->tag_set);
>
> /*
Powered by blists - more mailing lists