From: Raul E Rangel <rrangel@chromium.org>
To: linux-mmc@vger.kernel.org
Cc: djkurtz@google.com, adrian.hunter@intel.com,
zwisler@chromium.org, Raul E Rangel <rrangel@chromium.org>,
linux-kernel@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH 2/2] mmc: v4.14: Kill the request if the queuedata has been removed
Date: Wed, 8 May 2019 12:58:33 -0600 [thread overview]
Message-ID: <20190508185833.187068-2-rrangel@chromium.org> (raw)
In-Reply-To: <20190508185833.187068-1-rrangel@chromium.org>
No reason to even try processing the request if the queue is shutting
down.
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
---
This commit applies to v4.14.116.
This doesn't apply to 5.1 since mmc has been migrated to blk-mq.
drivers/mmc/core/queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index 4bf1a9c6440b..28c9646a4de9 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -30,7 +30,7 @@ static int mmc_prep_request(struct request_queue *q, struct request *req)
{
struct mmc_queue *mq = q->queuedata;
- if (mq && (mmc_card_removed(mq->card) || mmc_access_rpmb(mq)))
+ if (!mq || mmc_card_removed(mq->card) || mmc_access_rpmb(mq))
return BLKPREP_KILL;
req->rq_flags |= RQF_DONTPREP;
--
2.21.0.1020.gf2820cf01a-goog
next prev parent reply other threads:[~2019-05-08 18:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 18:58 [PATCH 1/2] mmc: v4.14: Fix null pointer dereference in mmc_init_request Raul E Rangel
2019-05-08 18:58 ` Raul E Rangel [this message]
2019-05-09 6:04 ` Christoph Hellwig
2019-05-09 18:42 ` Raul Rangel
2019-05-13 17:19 ` Raul Rangel
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=20190508185833.187068-2-rrangel@chromium.org \
--to=rrangel@chromium.org \
--cc=adrian.hunter@intel.com \
--cc=djkurtz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=zwisler@chromium.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®