Message ID | 20190513175521.84955-4-rrangel@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mmc: Fix a potential resource leak when shutting down request queue. | expand |
On Mon, May 13, 2019 at 11:55:21AM -0600, Raul E Rangel wrote: > No reason to even try processing the request if the queue is shutting > down. > > Signed-off-by: Raul E Rangel <rrangel@chromium.org> > --- > > drivers/mmc/core/queue.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter>
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index bd7d521d5ad9d..e7ac7163fafa4 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;
No reason to even try processing the request if the queue is shutting down. Signed-off-by: Raul E Rangel <rrangel@chromium.org> --- drivers/mmc/core/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)