From patchwork Wed Feb 13 21:32:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 158262 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp560954jaa; Wed, 13 Feb 2019 13:32:39 -0800 (PST) X-Received: by 2002:a0c:91bb:: with SMTP id n56mr222789qvn.77.1550093559770; Wed, 13 Feb 2019 13:32:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550093559; cv=none; d=google.com; s=arc-20160816; b=mu9XswFBvdlNMwVm8cx6TPvkn4LJcWhTV6SbOT2noNEjJN0KEmS5oQVWo2fHJEI6D7 EtZorTeReNVWnAFHV7zoR/PqJyz2iDClJR24R3Y8xZehFRBVtDQ+L0tvolEffQa8Efw6 hVKXJZVS2WqPxtKQZ63bGH66GtW+vmZ7ppsmrIPM587m3u0s7PJiq4fHFA8zUfNnFj26 NsqJzFeBe9GS6mOefIZpBzZRNjdMVfPVLBK9jbgIayhhrNz1DQQFeShg8+M5SvKmaT4f NKIE3G0xpqx5Y/6sik9fOiN3hsC8gptI1josr3Eg1fEqywh1fDJKnRW00YoXZHXtGJXw hbXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V4sXTOX89oZ7Fok9OP8IOaBv7K1P43zOxOdwYTTyDzQ=; b=uDi7ktwaLgvt4zXvAj1f7HroloWbBI2sLdrwWx5a4cs3LUgBTpJHt5ET0BrANSiOP/ lDXwmuOhDDpX3Wk/PTtw+LsWBuFXNHKM4sSR4GHOu6RfQf7+tseKSoBLsroOv4f45SPY KiTQnXMaweRa3wFNjX0nDw2PN7yfqmmjih3Pdqsn/W+sbtsNhIv+lmiSH7od6OEvMPMV rZ0eTKkIkoYGSBjFh57rdaYN1UcjSchUuA/xlaebmZAvLMJRdmvK0La2CEdxDmSDAQlh RmyrxM4tRQblYuv8geyhOuz7hGgul3QhSa/+2bS47BCY6/Tdc6kXnRVwyf4rsdAI1RPM B7cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W9Zi0TCq; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 26sor507338qve.51.2019.02.13.13.32.39 for (Google Transport Security); Wed, 13 Feb 2019 13:32:39 -0800 (PST) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W9Zi0TCq; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=V4sXTOX89oZ7Fok9OP8IOaBv7K1P43zOxOdwYTTyDzQ=; b=W9Zi0TCqR6GLe4u8bTBpGiG8zPTKlOJFU2ckqpfe2s80+2qTWssivV7jHs/ek8sdWO rgOvAd6BnlEO0c2l2e/WuwYC2mgjeu2vOOjfvrX3XKnr/PQqQpLYIy5bTrkYZQZJjuy5 F8vWjPLmbQcJ4fJMDW054jEFOmnnUCvtkHxGNpBg7Xv5d/3bphiKUfGAuKXDxyH7lzg7 yPHwOdtYmr1CR5lC/R1Jn0Er5t123dslHD1Ve8cuu3zzNxV9+YmHWjjLXmWaLzqWhMne /eixw3XbFLElxMoj1TsKUCIshZ8Pvsa8/FhQngugpw+WiP04ZJY+4HGq7ZsmStNgSP1D jL8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V4sXTOX89oZ7Fok9OP8IOaBv7K1P43zOxOdwYTTyDzQ=; b=pouS6zs/JpXyPdmLcgoMuctpscqzCrFb/OFaGQXEBYJQ1kgXzJqpvwNbnfKWb1OYnm OGkVBv67yRzliB+HCOtOc4jGwwwAh3RHtL8XssLH15quTm7rz5Wb4z9Vy42luwxnAe5t ikAGihdXP0/4557ahvVTL0T3AXz/h+etGcM/5CC+nqMnoDsUHehPo/wg8lxJraBFSxyR fGwv8RqXb7ACAGl2f+7wJGtEqkTfvcQ7UNzVrDXHT7T7K6xdmXcO8mwvtYlInAsa/5ud AIryq/LtP8nSIphU8x60jy072MeLhTVjfbKKgXUWs974plrBEVDiG0GJlkr1WjJPejbt AIgQ== X-Gm-Message-State: AHQUAuYKKV0Q6+LnMKSshrAWNoS4KummbXmwx7bZNTXOxdIXmjuE/4/3 tJU9if2BfVFIwTlvzVCl+fSyxbLJQU0zNw== X-Google-Smtp-Source: AHgI3IYAYr9H/+6fuvWVvrJy3jCzz+p2QCsgMb5HgCJHrylCwxqNm8L5th6PKwuKYz/9Joo/5gsZJQ== X-Received: by 2002:a0c:e486:: with SMTP id n6mr237775qvl.210.1550093559547; Wed, 13 Feb 2019 13:32:39 -0800 (PST) Return-Path: Received: from localhost.localdomain (pool-72-71-243-63.cncdnh.fast00.myfairpoint.net. [72.71.243.63]) by smtp.googlemail.com with ESMTPSA id 8sm382675qtr.7.2019.02.13.13.32.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 13:32:38 -0800 (PST) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Julien Thierry , Tony Lindgren , Marc Zyngier , Greg KH , Mark Rutland Cc: Will Deacon , Mark Brown , linux-kernel@vger.kernel.org Subject: [PATCH 4.19 10/17] ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc Date: Wed, 13 Feb 2019 16:32:16 -0500 Message-Id: <20190213213223.916-11-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190213213223.916-1-dave.long@linaro.org> References: <20190213213223.916-1-dave.long@linaro.org> From: Julien Thierry Commit 5df7a99bdd0de4a0480320264c44c04543c29d5a upstream. In vfp_preserve_user_clear_hwstate, ufp_exc->fpinst2 gets assigned to itself. It should actually be hwstate->fpinst2 that gets assigned to the ufp_exc field. Fixes commit 3aa2df6ec2ca6bc143a65351cca4266d03a8bc41 ("ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state"). Reported-by: David Binderman Signed-off-by: Julien Thierry Signed-off-by: Russell King Signed-off-by: David A. Long --- arch/arm/vfp/vfpmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 2b287d0d6bc2..66c5e693428a 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -578,7 +578,7 @@ int vfp_preserve_user_clear_hwstate(struct user_vfp *ufp, */ ufp_exc->fpexc = hwstate->fpexc; ufp_exc->fpinst = hwstate->fpinst; - ufp_exc->fpinst2 = ufp_exc->fpinst2; + ufp_exc->fpinst2 = hwstate->fpinst2; /* Ensure that VFP is disabled. */ vfp_flush_hwstate(thread);