From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0XE-0007GP-O3 for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:50:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF0XC-0007vw-OE for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:50:44 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:57919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF0XC-0007vQ-7n for qemu-devel@nongnu.org; Mon, 20 Jun 2016 10:50:42 -0400 From: Peter Maydell Date: Mon, 20 Jun 2016 15:50:36 +0100 Message-Id: <1466434237-19334-3-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1466434237-19334-1-git-send-email-peter.maydell@linaro.org> References: <1466434237-19334-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 2/3] linux-user: Fix wrong type used for argument to rt_sigqueueinfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org, Riku Voipio , Laurent Vivier The third argument to the rt_sigqueueinfo syscall is a pointer to a siginfo_t, not a pointer to a sigset_t. Fix the error in the arguments to lock_user(), which meant that we would not have detected some faults that we should. Signed-off-by: Peter Maydell --- linux-user/syscall.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7b3d129..8065284 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7909,8 +7909,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_rt_sigqueueinfo: { siginfo_t uinfo; - if (!(p = lock_user(VERIFY_READ, arg3, sizeof(target_sigset_t), 1))) + + p = lock_user(VERIFY_READ, arg3, sizeof(target_siginfo_t), 1); + if (!p) { goto efault; + } target_to_host_siginfo(&uinfo, p); unlock_user(p, arg1, 0); ret = get_errno(sys_rt_sigqueueinfo(arg1, arg2, &uinfo)); -- 1.9.1