This is a note to let you know that I've just added the patch titled mtd: maps: vmu-flash: Fix the (mtd core) switch to ref counters to the 6.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mtd-maps-vmu-flash-fix-the-mtd-core-switch-to-ref-counters.patch and it can be found in the queue-6.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a7d84a2e7663bbe12394cc771107e04668ea313a Mon Sep 17 00:00:00 2001 From: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Date: Tue, 5 Dec 2023 08:59:36 +0100 Subject: mtd: maps: vmu-flash: Fix the (mtd core) switch to ref counters From: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> commit a7d84a2e7663bbe12394cc771107e04668ea313a upstream. While switching to ref counters for track mtd devices use, the vmu-flash driver was forgotten. The reason for reading the ref counter seems debatable, but let's just fix the build for now. Fixes: 19bfa9ebebb5 ("mtd: use refcount to prevent corruption") Reported-by: kernel test robot <lkp@xxxxxxxxx> Closes: https://lore.kernel.org/oe-kbuild-all/202312022315.79twVRZw-lkp@xxxxxxxxx/ Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Link: https://lore.kernel.org/linux-mtd/20231205075936.13831-1-miquel.raynal@xxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mtd/maps/vmu-flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mtd/maps/vmu-flash.c +++ b/drivers/mtd/maps/vmu-flash.c @@ -719,7 +719,7 @@ static int vmu_can_unload(struct maple_d card = maple_get_drvdata(mdev); for (x = 0; x < card->partitions; x++) { mtd = &((card->mtd)[x]); - if (mtd->usecount > 0) + if (kref_read(&mtd->refcnt)) return 0; } return 1; Patches currently in stable-queue which might be from miquel.raynal@xxxxxxxxxxx are queue-6.7/mtd-rawnand-prevent-crossing-lun-boundaries-during-sequential-reads.patch queue-6.7/mtd-rawnand-fix-core-interference-with-sequential-reads.patch queue-6.7/mtd-rawnand-clarify-conditions-to-enable-continuous-reads.patch queue-6.7/dmaengine-xilinx-xdma-fix-the-count-of-elapsed-perio.patch queue-6.7/mtd-rawnand-prevent-sequential-reads-with-on-die-ecc-engines.patch queue-6.7/mtd-maps-vmu-flash-fix-the-mtd-core-switch-to-ref-counters.patch