From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: dm-devel@lists.linux.dev,
Christophe Varoqui <christophe.varoqui@opensvc.com>,
Martin Wilck <mwilck@suse.com>
Subject: Re: [PATCH] kpartx: fix segfault when operating on regular files
Date: Mon, 26 Jan 2026 10:58:59 -0500 [thread overview]
Message-ID: <aXePQyzFVnuWfpHt@redhat.com> (raw)
In-Reply-To: <aXeHyiI7YtdQKCZx@redhat.com>
On Mon, Jan 26, 2026 at 10:27:07AM -0500, Benjamin Marzinski wrote:
> On Mon, Jan 26, 2026 at 01:13:25PM +0100, Martin Wilck wrote:
> > The following problem has been introduced in multipath-tools 0.14.0:
> >
> > [snip]
> > diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
> > index 9bdd204..cfd8212 100644
> > --- a/kpartx/kpartx.c
> > +++ b/kpartx/kpartx.c
> > @@ -334,8 +334,11 @@ main(int argc, char **argv){
> > * This allows deletion of partitions created with older kpartx
> > * versions which didn't use the fake UUID during creation.
> > */
> > - if (!uuid && !(what == DELETE && force_devmap))
> > + if (!uuid && !(what == DELETE && force_devmap)) {
> > uuid = nondm_create_uuid(buf.st_rdev);
> > + if (!uuid)
>
> We should probably print an error message before we exit, but
> otherwise, this looks good.
>
> -Ben
After being reminded that there's not much point in trying to print
error messages after failing a memory allocation,
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> > + exit(1);
> > + }
> >
> > if (delim == NULL) {
> > delim = xmalloc(DELIM_SIZE);
> > --
> > 2.52.0
next prev parent reply other threads:[~2026-01-26 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 12:13 [PATCH] kpartx: fix segfault when operating on regular files Martin Wilck
2026-01-26 15:27 ` Benjamin Marzinski
2026-01-26 15:58 ` Benjamin Marzinski [this message]
2026-01-26 15:48 ` Bastian Blank
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=aXePQyzFVnuWfpHt@redhat.com \
--to=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@lists.linux.dev \
--cc=martin.wilck@suse.com \
--cc=mwilck@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox