Re: [PATCH v1] mtd: ubi: Release device reference on busy detach

From: Richard Weinberger

Date: Tue Aug 11 2026 - 18:10:52 EST


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