summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorYuho Choi <dbgh9129@gmail.com>2026-06-08 00:06:39 -0400
committerRichard Weinberger <richard@nod.at>2026-08-12 00:03:50 +0200
commit5b0a6b554e12a97f9771a9a9f4ea1f5457373c73 (patch)
treee4fdc3c25b403bedbfa811cb2702bec470dee62b /scripts/const_structs.checkpatch
parent95d27c1708bb6e8823c8e7c623f9abc2a91bf4bf (diff)
downloadlinux-5b0a6b554e12a97f9771a9a9f4ea1f5457373c73.tar.gz
linux-5b0a6b554e12a97f9771a9a9f4ea1f5457373c73.zip
ubi: Fix rollback for explicit UBI device numbers
ubi_init_attach() rolls back module initialization failures by scanning ubi_devices[0..i-1], where i is the mtd= parameter index. That assumes the parameter index matches the UBI device number. That assumption is not true when mtd= specifies an explicit ubi_num. A successfully attached device can be stored at a higher ubi_devices[] slot, and a later failure can miss it during rollback. Scan the full ubi_devices[] array and detach by the actual array index, matching the way UBI devices are stored. Fixes: 83ff59a06663 ("UBI: support ubi_num on mtd.ubi command line") Signed-off-by: Yuho Choi <dbgh9129@gmail.com> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions