[PATCH v1] mtd: ubi: Release device reference on busy detach
Richard Weinberger
rw at kernel.org
Tue Aug 11 15:10:42 PDT 2026
On Fri, 07 Aug 2026 16:45:50 -0400, Yuho Choi wrote:
> ubi_detach_mtd_dev() obtains a device reference through ubi_get_device()
> before checking whether the UBI device is busy. The busy return path drops
> ubi->ref_count but leaves the device reference held, so the device object
> cannot be released after a later detach.
>
> Drop the device reference before returning -EBUSY.
>
> [...]
Applied, thanks!
[1/1] mtd: ubi: Release device reference on busy detach
commit: 31dd710cd84d5dd63c49f640d3a9f36c9699ca95
More information about the linux-mtd
mailing list