acrn-kernel/drivers/mtd
Greg Kroah-Hartman 8e610b6993 mtd: spi-nor: fix memory leak when using debugfs_lookup()
[ Upstream commit ec738ca127 ]

When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time.  To solve this, remove the
lookup and create the directory on the first device found, and then
remove it when the module is unloaded.

Cc: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: Pratyush Yadav <pratyush@kernel.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20230208160230.2179905-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-26 14:28:37 +02:00
..
chips
devices
hyperbus
lpddr
maps
nand mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min 2023-04-20 12:35:07 +02:00
parsers
spi-nor mtd: spi-nor: fix memory leak when using debugfs_lookup() 2023-04-26 14:28:37 +02:00
tests
ubi ubi: Fix deadlock caused by recursively holding work_sem 2023-04-20 12:35:14 +02:00
Kconfig
Makefile
ftl.c
inftlcore.c
inftlmount.c
mtd_blkdevs.c
mtdblock.c mtdblock: tolerate corrected bit-flips 2023-04-20 12:35:06 +02:00
mtdblock_ro.c
mtdchar.c
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c
mtdpart.c
mtdpstore.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c