|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] tools/xl: don't crash on NULL command line
commit a4988c4177be81f225af1516e1bbb9ec14f76388
Author: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
AuthorDate: Thu Jul 31 13:46:17 2025 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 31 14:44:02 2025 +0200
tools/xl: don't crash on NULL command line
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@xxxxxxxxxxxxxxxxxxxxxx>
Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
tools/xl/xl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/xl/xl.c b/tools/xl/xl.c
index ec72ca60c3..b3abc91b60 100644
--- a/tools/xl/xl.c
+++ b/tools/xl/xl.c
@@ -79,7 +79,7 @@ static int auto_autoballoon(void)
int ret;
info = libxl_get_version_info(ctx);
- if (!info)
+ if (!info || !info->commandline)
return 1; /* default to on */
#define SIZE_PATTERN "-?[0-9]+[bBkKmMgGtT]?"
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |