From: "genjian zhang" <zhanggenjian@126.com>
To: "Ming Hung Tsai" <mtsai@redhat.com>
Cc: agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com,
bmarzins@redhat.com, ejt@redhat.com, dm-devel@lists.linux.dev,
linux-kernel@vger.kernel.org,
"Genjian Zhang" <zhanggenjian@kylinos.cn>
Subject: Re: [PATCH] dm thin metadata: fix superblock refcount leak on snapshot shadow failure
Date: Mon, 13 Jul 2026 21:49:02 +0800 (CST) [thread overview]
Message-ID: <2b682ca7.83e1.19f5bbd072c.Coremail.zhanggenjian@126.com> (raw)
In-Reply-To: <CALjSBEtD00yuLaBJXtJjFG7L0nCLRaGDUVGoN7VZ4wkVRD0CDQ@mail.gmail.com>
At 2026-07-13 10:40:48, "Ming Hung Tsai" <mtsai@redhat.com> wrote:
>On Sat, Jul 11, 2026 at 6:16 PM Genjian <zhanggenjian@126.com> wrote:
>>
>> From: Genjian Zhang <zhanggenjian@kylinos.cn>
>>
>> __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 <zhanggenjian@kylinos.cn>
>> ---
>
>The fix looks reasonable as a best-effort cleanup for the immediate
>refcount leak.
Thanks for the review.
Thanks,
Genjian
prev parent reply other threads:[~2026-07-13 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 10:05 Genjian
2026-07-13 2:40 ` Ming Hung Tsai
2026-07-13 13:49 ` genjian zhang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2b682ca7.83e1.19f5bbd072c.Coremail.zhanggenjian@126.com \
--to=zhanggenjian@126.com \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=ejt@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=mtsai@redhat.com \
--cc=snitzer@kernel.org \
--cc=zhanggenjian@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome