From patchwork Thu Feb 14 14:49:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 158403 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1462281jaa; Thu, 14 Feb 2019 06:49:45 -0800 (PST) X-Received: by 2002:a0c:8164:: with SMTP id 91mr3219985qvc.100.1550155785442; Thu, 14 Feb 2019 06:49:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550155785; cv=none; d=google.com; s=arc-20160816; b=EFA88e+XPHX8yyQGzAx534pRo/QlpjjMqSBqYhxBM4YIDpitRM9NDT1PQYS0WaarZl XhpjZxc+D6PIDzZ8S95r+OA67rzNIvLAh55stLDYbpGLgwSg1aF/109WwbQGbEKgDUYX 36hm8L7i5AmGblP876HUVuJynZ1EMrVwxWwFtjqxrWTDDqfKjUpOPOOGdC/JdEGZuivn 3050BzAAqJaEEcGEXCCLotnQnVnkAEP6U2gLmX4y5RlqCs6iKXlG9jmABBV3qpF8nrmY BwIFCZzlyS991ilN9anH1rUPXlVTo1uNnRKr/DfS2/nkOgoDvvX80Lbb59R3i9IF+LiU NWTw== 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=Al89NpupvfZvzBikplZ0PcauK1wQlzW/uE8qgbOT/SY=; b=Ez8EgGs3TnhBxrkcGtDU9NHu546Fh/qN+DTujz5eUt5WpKomObXPzAi1prUowtFZSa R8ywm5LmOtItepAx/SQ6VAIyMoPOx3Nn8wYb2D9bZa4/E1ls6CEwejC37U2XDAQ/VZVa 62lohc6LaTO2xjq6YYNV95ZxnUiSXHYZoXD6jq88rD3snFnQCq6PeW5dPqFDsuNPjIcL gjTD10DMN7KZSHJyGgrHWA4ampLW12WCE9exaTgbRD/W5Bhro9COcRMcMOB68TVd9ZF3 nxiCoEql/2RdUV/wvVyttiMsGfxWFng/BaKYc+Z1QZY4SVsvpr2F2gyihAjKYt/5u5Hm 3SIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pJpr5xvt; 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 u41sor2920789qvf.42.2019.02.14.06.49.45 for (Google Transport Security); Thu, 14 Feb 2019 06:49:45 -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=pJpr5xvt; 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=Al89NpupvfZvzBikplZ0PcauK1wQlzW/uE8qgbOT/SY=; b=pJpr5xvtUAjUJWpURhnPcWNTSV61J+pt4ZvWEWqt2dhyoDdRLyOfpnydSu3hiyOE4t byJLhaumPjfJZC/mz+3u+af6gynVCSCLBoeNPkZLsUCQpBl1HmhbBRQ79L0ALWEyw1Mc /kftsyY+4LQCpggccbtPJ/vAC4RW+LLEaZvQe1dEvw4CMiCPF+kcHhBPmQI3U2TiyNgT f7hkeGPUhCKhGWdrMZCkoqi0e7anvPePWhQJp2F16K4MVLOrZZnaIUDpqat8Ja8aflGh 8pa/7zlxlNjE+y/krS/ASmgb9chS0t4t52/6bUvhkMz/nN2zr5WQanfcCeq5myKYCKCa AWTA== 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=Al89NpupvfZvzBikplZ0PcauK1wQlzW/uE8qgbOT/SY=; b=BLNIHLswtlmwLdqbogY1t9796pJHslIIlE2g96u4vk0O56T49BO2+IdkUw9ZcgxlMJ 92ylGGpTSe83txU0TGrqoxIqPYN6zpFlCRy5F/WooNEzh45T6V8PjZkodS4QckuE+Kdt zmHVCLlfXeQ5XI/BduKO5Tb24duqrh5iC/pBSQBev/IdtBzQRe9vITfdy8R9L6sf6ZCF sVszQ4x2CMCy/mDMWKKnTVNqrXi7Kugm/xvFvDXsJTD6VpVFhTzcr1KNk43NUWthxqsK NyYs53j3tFOB5oAFeYn3RukU5U9GZ9HpLHc3VvUc59hx0zMGiVZHgV5pEWhOllUjm4o3 zwJw== X-Gm-Message-State: AHQUAubTpywVFoCJ8HVU3WZc6Vclw+9boDbNmrVdIuW9Zzv2HJaqF2mX +JvJHgxtMWLOR8YsZV3vzB6D35n7 X-Google-Smtp-Source: AHgI3IY6xdj32cNiqp1cqU8Z6po4iX/FAASpw8YLC1v6uJLVWZOQ1fH4NVxIE5gQXqiqY6Tq4n5zGg== X-Received: by 2002:a0c:9e05:: with SMTP id p5mr3172793qve.246.1550155785194; Thu, 14 Feb 2019 06:49:45 -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 k66sm1498919qkc.25.2019.02.14.06.49.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 06:49:44 -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.9 09/16] ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc Date: Thu, 14 Feb 2019 09:49:23 -0500 Message-Id: <20190214144930.27539-10-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214144930.27539-1-dave.long@linaro.org> References: <20190214144930.27539-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 df3fa52c0aa3..00dd8cf36632 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -579,7 +579,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);