From 46187d707e7639b743a3b9f72da03ad4b9abc255 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Wed, 5 Oct 2022 18:38:26 +0200 Subject: linux-user: fix pidfd_send_signal() According to pidfd_send_signal(2), info argument can be a NULL pointer. Fix strace to correctly manage ending comma in parameters. Fixes: cc054c6f13 ("linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls") cc: Helge Deller Signed-off-by: Laurent Vivier Reviewed-by: Helge Deller Message-Id: <20221005163826.1455313-1-laurent@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux-user/strace.c') diff --git a/linux-user/strace.c b/linux-user/strace.c index 37bc96df9b..86c081c83f 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -3383,10 +3383,10 @@ print_pidfd_send_signal(CPUArchState *cpu_env, const struct syscallname *name, unlock_user(p, arg2, 0); } else { - print_pointer(arg2, 1); + print_pointer(arg2, 0); } - print_raw_param("%u", arg3, 0); + print_raw_param("%u", arg3, 1); print_syscall_epilogue(name); } #endif -- cgit v1.2.3