From: Anthony PERARD <anthony@xenproject.org>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
xen-devel@lists.xenproject.org,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>
Subject: Re: [PATCH] tools/xl: don't crash on NULL command line
Date: Thu, 31 Jul 2025 11:45:42 +0200 [thread overview]
Message-ID: <aIs7Rg0sB7C2BUWA@l14> (raw)
In-Reply-To: <aIdo5K6RfTUFr__Q@macbook.local>
On Mon, Jul 28, 2025 at 02:11:16PM +0200, Roger Pau Monné wrote:
> On Mon, Jul 28, 2025 at 12:24:03PM +0200, Marek Marczykowski-Górecki wrote:
> > When running xl in a domU, it doesn't have access to the Xen command
> > line. Before the non-truncating xc_xenver_cmdline(), it was always set
> > with strdup, possibly of an empty string. Now it's NULL. Treat it the
> > same as empty cmdline, as it was before. Autoballoon isn't relevant for
> > xl devd in a domU anyway.
> >
> > Fixes: 75f91607621c ("tools: Introduce a non-truncating xc_xenver_cmdline()")
> > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> > ---
> > tools/xl/xl.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/xl/xl.c b/tools/xl/xl.c
> > index ec72ca60c32a..e183d42b1d65 100644
> > --- a/tools/xl/xl.c
> > +++ b/tools/xl/xl.c
> > @@ -81,6 +81,8 @@ static int auto_autoballoon(void)
> > info = libxl_get_version_info(ctx);
> > if (!info)
> > return 1; /* default to on */
> > + if (!info->commandline)
> > + return 1;
>
> It's a nit, but could you join with the previous if condition, so that
> the comment also applies?
>
> if (!info || !info->commandline)
> return 1; /* default to on */
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks,
--
Anthony PERARD
prev parent reply other threads:[~2025-07-31 9:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-28 10:24 [PATCH] tools/xl: don't crash on NULL command line Marek Marczykowski-Górecki
2025-07-28 10:45 ` Andrew Cooper
2025-07-28 10:50 ` Frediano Ziglio
2025-07-28 10:54 ` Jan Beulich
2025-07-29 0:29 ` Jason Andryuk
2025-07-29 6:55 ` Andrew Cooper
2025-07-28 12:11 ` Roger Pau Monné
2025-07-31 9:45 ` Anthony PERARD [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=aIs7Rg0sB7C2BUWA@l14 \
--to=anthony@xenproject.org \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=marmarek@invisiblethingslab.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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.