Re: [PATCH] dm thin metadata: fix superblock refcount leak on snapshot shadow failure
"genjian zhang" <[email protected]> Mon, 13 Jul 2026 21:49:02 +0800 (CST)
| Newsgroups | dev.linux.lists.dm-devel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
At 2026-07-13 10:40:48, "Ming Hung Tsai" <[email protected]> wrote: >On Sat, Jul 11, 2026 at 6:16 PM Genjian <[email protected]> wrote: >> >> From: Genjian Zhang <[email protected]> >> >> __reserve_metadata_snap() increments THIN_SUPERBLOCK_LOCATION in the >> metadata space map before shadowing it. When dm_tm_shadow_block() >> fails, a reference is leaked in the metadata space map. >> >> Fix by adding the missing dm_sm_dec_block(). >> >> Fixes: cc8394d86f04 ("dm thin: provide userspace access to pool metadata") >> Signed-off-by: Genjian Zhang <[email protected]> >> --- > >The fix looks reasonable as a best-effort cleanup for the immediate >refcount leak. Thanks for the review. Thanks, Genjian