linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [stable/4.14.y PATCH 0/3] mmc: Fix a potential resource leak when shutting down request queue.
@ 2019-05-13 17:55 Raul E Rangel
  2019-05-13 17:55 ` [stable/4.14.y PATCH 1/3] mmc: block: Simplify cleaning up the queue Raul E Rangel
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Raul E Rangel @ 2019-05-13 17:55 UTC (permalink / raw)
  To: stable
  Cc: linux-mmc, djkurtz, adrian.hunter, zwisler, Raul E Rangel,
	Linus Walleij, linux-kernel, Chris Boot, Clément Péron,
	Greg Kroah-Hartman, Ulf Hansson

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-06-19 18:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-13 17:55 [stable/4.14.y PATCH 0/3] mmc: Fix a potential resource leak when shutting down request queue Raul E Rangel
2019-05-13 17:55 ` [stable/4.14.y PATCH 1/3] mmc: block: Simplify cleaning up the queue Raul E Rangel
2019-05-13 17:55 ` [stable/4.14.y PATCH 2/3] mmc: Fix null pointer dereference in mmc_init_request Raul E Rangel
2019-05-13 20:12   ` Greg KH
2019-05-13 17:55 ` [stable/4.14.y PATCH 3/3] mmc: Kill the request if the queuedata has been removed Raul E Rangel
2019-05-13 20:12   ` Greg KH
2019-05-14  0:43 ` [stable/4.14.y PATCH 0/3] mmc: Fix a potential resource leak when shutting down request queue Sasha Levin
2019-05-14  9:19 ` Greg Kroah-Hartman
2019-06-19 16:46   ` Raul Rangel
2019-06-19 17:09     ` Greg Kroah-Hartman
2019-06-19 18:23       ` Raul Rangel
2019-06-19 18:36         ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).