From: Adrian Hunter <adrian.hunter@intel.com>
To: "Christian Löhle" <CLoehle@hyperstone.com>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Linux MMC List" <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv2 2/2] mmc: queue: Cancel recovery work on cleanup
Date: Sat, 8 Oct 2022 14:31:34 +0300 [thread overview]
Message-ID: <490cdc50-737a-ff64-f21a-23dd59153cbc@intel.com> (raw)
In-Reply-To: <c865c0c9789d428494b67b820a78923e@hyperstone.com>
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@vger.kernel.org
>
> Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.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);
>
> /*
next prev parent reply other threads:[~2022-10-08 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 15:43 Christian Löhle
2022-10-08 11:31 ` Adrian Hunter [this message]
2022-10-13 14:20 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=490cdc50-737a-ff64-f21a-23dd59153cbc@intel.com \
--to=adrian.hunter@intel.com \
--cc=CLoehle@hyperstone.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®