From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNnz-0000qH-8R for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGNnt-0003NP-Jm for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:42 -0400 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:36682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNnt-0003NH-BY for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:37 -0400 Received: by mail-lf0-x230.google.com with SMTP id q132so112559143lfe.3 for ; Fri, 24 Jun 2016 02:53:37 -0700 (PDT) From: riku.voipio@linaro.org Date: Fri, 24 Jun 2016 12:53:05 +0300 Message-Id: <48a32aaa67a77a0fba96500f489b6018a38b36bd.1466760944.git.riku.voipio@linaro.org> In-Reply-To: References: Subject: [Qemu-devel] [PULL 10/24] 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: Peter Maydell From: Peter Maydell 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 Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- 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 95eafeb..686ebfb 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7876,8 +7876,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)); -- 2.1.4