From patchwork Fri Aug 15 11:01:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 35447 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F346E23917 for ; Fri, 15 Aug 2014 11:12:41 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id v10sf5994609qac.8 for ; Fri, 15 Aug 2014 04:12:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=b4h+vpUNc34B4ZDCPOGdS0FZ9juEByseb7zh7nMEGmo=; b=gEaW0y0rxD9c2y49S6c/j8B0+7txeN3Quir18SGlz1EoERNiSfOOwufA2pfqIRXZPI VtEbM4pvo/9pGL0FnifhTTA2+HHmSmZskEyhVZxKRjvCf5BIRG7ALwfam4A+ftjZiFhA D6yVLJTnoSQjwf9GziAYa7zpWGKW/umTyNESb2iWVz21xsNeXP+5qfviFJQvQt3VHVDH jFKvvqc4EWOkGBMwUYzprlbcusRFp4KNidtnCGuKD/y7AsY3z6T+D4Oykka3hQKuCGyo XWQ5fJzXAfA6aPlG49gJ/UpKVNi05FrLPtLZuBt70GQ5OoKEKlBq/hInr73OPINPl3TF DgdQ== X-Gm-Message-State: ALoCoQkv8XtQiwXhm9i8MqhpjgoyJr0MJT2qIJwJIy2ONHgrQM5pPQERy9DgbenMhfJd/Rr4Ktz3 X-Received: by 10.236.1.198 with SMTP id 46mr5490424yhd.16.1408101161836; Fri, 15 Aug 2014 04:12:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.17.47 with SMTP id 44ls977724qgc.11.gmail; Fri, 15 Aug 2014 04:12:41 -0700 (PDT) X-Received: by 10.140.102.162 with SMTP id w31mr24792977qge.67.1408101161710; Fri, 15 Aug 2014 04:12:41 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id f3si11366193qab.50.2014.08.15.04.12.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Aug 2014 04:12:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id le20so2794331vcb.14 for ; Fri, 15 Aug 2014 04:12:41 -0700 (PDT) X-Received: by 10.52.156.100 with SMTP id wd4mr12902858vdb.39.1408101161503; Fri, 15 Aug 2014 04:12:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp104599vcb; Fri, 15 Aug 2014 04:12:41 -0700 (PDT) X-Received: by 10.140.86.147 with SMTP id p19mr25462517qgd.66.1408101160934; Fri, 15 Aug 2014 04:12:40 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p5si11362871qcc.10.2014.08.15.04.12.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 15 Aug 2014 04:12:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:58644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIFR2-0005wx-Eq for patch@linaro.org; Fri, 15 Aug 2014 07:12:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIFGd-0004xD-9E for qemu-devel@nongnu.org; Fri, 15 Aug 2014 07:02:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIFGV-00072q-0U for qemu-devel@nongnu.org; Fri, 15 Aug 2014 07:01:55 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=44496 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIFGU-00071S-Qv for qemu-devel@nongnu.org; Fri, 15 Aug 2014 07:01:46 -0400 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 3A7F526688; Fri, 15 Aug 2014 13:01:45 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 15 Aug 2014 14:01:36 +0300 Message-Id: <72cc84edc555713138db9a0bde7bc2a9c5e54fa6.1408100160.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:4b98:dc0:45:216:3eff:fe3d:166f Cc: Peter Maydell , Tom Musta Subject: [Qemu-devel] [PULL 18/24] linux-user: Detect fault in sched_rr_get_interval X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Tom Musta Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a0436da..a24356d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7864,7 +7864,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, struct timespec ts; ret = get_errno(sched_rr_get_interval(arg1, &ts)); if (!is_error(ret)) { - host_to_target_timespec(arg2, &ts); + ret = host_to_target_timespec(arg2, &ts); } } break;