[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190513175521.84955-1-rrangel@chromium.org>
Date: Mon, 13 May 2019 11:55:18 -0600
From: Raul E Rangel <rrangel@...omium.org>
To: stable@...r.kernel.org
Cc: linux-mmc@...r.kernel.org, djkurtz@...gle.com,
adrian.hunter@...el.com, zwisler@...omium.org,
Raul E Rangel <rrangel@...omium.org>,
Linus Walleij <linus.walleij@...aro.org>,
linux-kernel@...r.kernel.org, Chris Boot <bootc@...tc.net>,
Clément Péron <peron.clem@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ulf Hansson <ulf.hansson@...aro.org>
Subject: [stable/4.14.y PATCH 0/3] mmc: Fix a potential resource leak when shutting down request queue.
I think we should cherry-pick 41e3efd07d5a02c80f503e29d755aa1bbb4245de
https://lore.kernel.org/patchwork/patch/856512/ into 4.14. It fixes a
potential resource leak when shutting down the request queue.
Once this patch is applied, there is a potential for a null pointer dereference.
That's what the second patch fixes.
The third patch is just an optimization to stop processing earlier.
See https://patchwork.kernel.org/patch/10925469/ for the initial motivation.
This commit applies to v4.14.116. It is already included in 4.19. 4.19 doesn't
suffer from the null pointer dereference because later commits migrate the mmc
stack to blk-mq.
I tested this patch set by randomly connecting/disconnecting the SD
card. I got over 189650 itarations without a problem.
Thanks,
Raul
Adrian Hunter (1):
mmc: block: Simplify cleaning up the queue
Raul E Rangel (2):
mmc: Fix null pointer dereference in mmc_init_request
mmc: Kill the request if the queuedata has been removed
drivers/mmc/core/block.c | 17 ++++++++++++-----
drivers/mmc/core/queue.c | 14 +++++++++++---
2 files changed, 23 insertions(+), 8 deletions(-)
--
2.21.0.1020.gf2820cf01a-goog
Powered by blists - more mailing lists