linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] meson-nand: two small memory related fixes
@ 2019-03-18 20:47 Martin Blumenstingl
  2019-03-18 20:47 ` [PATCH v2 1/2] mtd: rawnand: meson: add missing ENOMEM check in meson_nfc_read_buf() Martin Blumenstingl
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-03-18 20:47 UTC (permalink / raw)
  To: linux-amlogic, linux-mtd, bbrezillon, miquel.raynal
  Cc: Martin Blumenstingl, richard, liang.yang, linux-kernel, jianxin.pan

While trying to add support for older Meson SoCs to the meson-nand
driver I was experiencing a crash in meson_nfc_read_buf(). While trying
to find out why that happened I inspected the code in that function and
found that there's:
- a missing check on the return value of a kzalloc() call
- a potential memory leak in it

Both fixes have nothing to do with my original crash (for which I'll
open a separate thread).


Changes since v1:
- collected Liang's Acked-by's (thank you!)
- rebased on top of v5.1-rc1


Martin Blumenstingl (2):
  mtd: rawnand: meson: add missing ENOMEM check in meson_nfc_read_buf()
  mtd: rawnand: meson: fix a potential memory leak in meson_nfc_read_buf

 drivers/mtd/nand/raw/meson_nand.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.21.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2019-04-01 15:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 20:47 [PATCH v2 0/2] meson-nand: two small memory related fixes Martin Blumenstingl
2019-03-18 20:47 ` [PATCH v2 1/2] mtd: rawnand: meson: add missing ENOMEM check in meson_nfc_read_buf() Martin Blumenstingl
2019-03-19 16:16   ` Kevin Hilman
2019-03-18 20:47 ` [PATCH v2 2/2] mtd: rawnand: meson: fix a potential memory leak in meson_nfc_read_buf Martin Blumenstingl
2019-03-19 16:17   ` Kevin Hilman
2019-04-01 15:27 ` [PATCH v2 0/2] meson-nand: two small memory related fixes Miquel Raynal

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).