summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorRuoyu Wang <ruoyuw560@gmail.com>2026-06-09 16:45:27 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-06-11 09:20:39 +0200
commit36f1648644d769c496a8e47e53603e863e358d73 (patch)
tree1ffaf50716ef2b89b2292b52751f0fa3b81c946b /scripts/const_structs.checkpatch
parent72de4a7c8e2953ae489120203d2c45bb59c5c54f (diff)
mtd: slram: remove failed entries from the device list
register_device() links a new slram_mtdlist entry before allocating all of the state needed by the entry. If a later allocation, memremap(), or mtd_device_register() fails, the partially initialized entry remains on the global list. A later cleanup can then dereference or free invalid state from that failed entry. Unwind the partially initialized entry and clear the list tail on each failure path after the entry has been linked. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions