From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de ([212.227.17.10]:64408 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932811AbdKGOKw (ORCPT ); Tue, 7 Nov 2017 09:10:52 -0500 From: Arnd Bergmann To: Richard Henderson Cc: Ivan Kokshaysky , Matt Turner , Alexander Viro , y2038@lists.linaro.org, Deepa Dinamani , Arnd Bergmann , stable@vger.kernel.org, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] alpha: osf_sys.c: fix put_tv32 regression Date: Tue, 7 Nov 2017 15:09:24 +0100 Message-Id: <20171107141029.3160278-1-arnd@arndb.de> Sender: stable-owner@vger.kernel.org List-ID: There was a typo in the new version of put_tv32() that caused uninitialized stack data to be written back to user space, rather than writing the actual timeval for the emulation of gettimeofday(), wait4(), usleep_thread() and old_adjtimex(). This fixes it to write the correct data again. Cc: stable@vger.kernel.org Fixes: 1cc6c4635e9f ("osf_sys.c: switch handling of timeval32/itimerval32 to copy_{to,from}_user()") Signed-off-by: Arnd Bergmann --- arch/alpha/kernel/osf_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index ce3a675c0c4b..75a5c35a2067 100644 --- 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)); } -- 2.9.0