Received: by 10.223.185.116 with SMTP id b49csp2189045wrg; Thu, 15 Feb 2018 07:51:11 -0800 (PST) X-Google-Smtp-Source: AH8x2254rZp2WqWwaToC4zFHvN0HGy/uOPzDIln2Qehn8HF8PB0xxG6NXQIy3W5TZQlpiUe/snKl X-Received: by 2002:a17:902:12f:: with SMTP id 44-v6mr2946141plb.403.1518709871795; Thu, 15 Feb 2018 07:51:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518709871; cv=none; d=google.com; s=arc-20160816; b=xtVLd6+2V6fn75Uln5bo+23Qz/DFzwZZzB1JckPVpVs7cpSMKVC9naI/uLu/hfIWXd fQRp8FMUlHcTUO98h47u1HmwZeca4EHsDR69MOngTk0iPwbSaEfpssgYTZRKrEEO044d mEHuRfAjOKlitZU6cjsiEMVUl5BjSH9sykXeUQvi4n6UCqYMR/A8vRaw90F7E03lIN3e MiBYL/gLXB66IqZx6yySyF6QMrwYxWP+spAeGh2vgEPbyMnqDyrOnvtx/9nRUKEouwwp wAs54ffL5AqxqOH7IIzwhyTSJ1Ru4mUeXwageT03LFoUHaql+TL2Y8uJMaWzvSNAwmB5 Zvlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=zCC02Ul4ABi7K34R8SjFKD4viEV45MxEOe7GCkMWjP8=; b=X8cri2qvL5jSfP9L4HpTvDiRjjhTzr6FqxpGEAfeFILWBVKxOgCIP26Qp3jYlp2017 kUe5YlHcwYhOvAACaeN4GNMBsmhC0nj0N4sP1Q9A+rnvcTPViZEIm0845IbjTuOpzXdq pFKI1TpRn3kFEp26XkdkQRFvIXZdGSv7gTu8uHhk6rpd6azqF50BD+GX6+wvKv6iKzI3 uMMAhwpQTGGt1Tb6wUvNov0RcmTfHdqgSBxsqNrqhFpql0ywg6e7EWG+Q9Ldw8ghH6mE MhGxvz7Z8suoYHjFqm2FxKCYU3OIMXazpgpMnfYl9kYLmDW7l/z8N1P6cxAL9XoJWjKk M5oQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i67si163957pfj.212.2018.02.15.07.50.56; Thu, 15 Feb 2018 07:51:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425024AbeBOPsE (ORCPT + 99 others); Thu, 15 Feb 2018 10:48:04 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36416 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425009AbeBOPsC (ORCPT ); Thu, 15 Feb 2018 10:48:02 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4AB37107D; Thu, 15 Feb 2018 15:48:01 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Al Viro Subject: [PATCH 4.15 169/202] alpha: osf_sys.c: fix put_tv32 regression Date: Thu, 15 Feb 2018 16:17:49 +0100 Message-Id: <20180215151721.703089781@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 47669fb6b5951d0e09fc99719653e0ac92b50b99 upstream. There was a typo in the new version of put_tv32() that caused an unguarded access of a user space pointer, and failed to return the correct result in gettimeofday(), wait4(), usleep_thread() and old_adjtimex(). This fixes it to give the correct behavior again. Fixes: 1cc6c4635e9f ("osf_sys.c: switch handling of timeval32/itimerval32 to copy_{to,from}_user()") Signed-off-by: Arnd Bergmann Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- arch/alpha/kernel/osf_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -964,8 +964,8 @@ static inline long put_tv32(struct timeval32 __user *o, struct timeval *i) { return copy_to_user(o, &(struct timeval32){ - .tv_sec = o->tv_sec, - .tv_usec = o->tv_usec}, + .tv_sec = i->tv_sec, + .tv_usec = i->tv_usec}, sizeof(struct timeval32)); }