From: Deepak Pandey <deepak.os.system@gmail.com>
To: 847807867@qq.com
Cc: agk@redhat.com, bmarzins@redhat.com, dm-devel@lists.linux.dev,
linux-kernel@vger.kernel.org, mpatocka@redhat.com,
snitzer@kernel.org,
syzbot+1eda626824b6334f5ad3@syzkaller.appspotmail.com,
Deepak Pandey <deepak.os.system@gmail.com>
Subject: Re: [PATCH] dm snap: clear pointers in alloc_area() error paths
Date: Fri, 27 Nov 2026 17:34:34 +0530 [thread overview]
Message-ID: <20261127120434.746380-1-deepak.os.system@gmail.com> (raw)
In-Reply-To: <tencent_D498CB0489BB9C74184B927C7393282E9806@qq.com>
On Fri, Nov 27, 2026 at 09:58:00AM +0000, Shuai Liu wrote:
> alloc_area() vfrees ps->zero_area and ps->area on allocation failure
> but leaves the dangling pointers. When the snapshot constructor then
> calls free_area() as part of teardown, it vfrees the same buffers
> again, triggering a WARNING in vfree().
>
> Set those pointers to NULL after vfree(). vfree(NULL) is a no-op,
> so free_area() is safe to call multiple times.
I reproduced this issue locally using the syzbot reproducer in QEMU and
verified that this patch resolves the double vfree() warning on -ENOMEM.
Tested-by: Deepak Pandey <deepak.os.system@gmail.com>
prev parent reply other threads:[~2026-11-27 12:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 9:58 [PATCH] dm snap: clear pointers in alloc_area() error paths Shuai Liu
2026-11-27 12:04 ` Deepak Pandey [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=20261127120434.746380-1-deepak.os.system@gmail.com \
--to=deepak.os.system@gmail.com \
--cc=847807867@qq.com \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
--cc=syzbot+1eda626824b6334f5ad3@syzkaller.appspotmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.