Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1322076yba; Tue, 2 Apr 2019 06:51:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKa9OlQElZIS+TZMxqv+EbRRUS81qzjediWyJAqoKy4jhRcycl4xsyMxu752RmRo2cR+sM X-Received: by 2002:a62:41dc:: with SMTP id g89mr67089694pfd.109.1554213081260; Tue, 02 Apr 2019 06:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554213081; cv=none; d=google.com; s=arc-20160816; b=RQSg+0sJvQUJDZUAea9XnotO97Os3qrxbfO0B2n2cOD0Pdz5gO2pJj6PoNKggwS2Nd 4eT3aMVVp4fCxnUVZ8FmI8bSH5hscb/nn+Ik6FaLFfJyf8Jmow/SfIZSfYEg6uD74wta ooDL7/D8ntpXVeEmVmVXXFFN9ksSdpkzp/6j7xSKBMKSImqRNowCbA2G4tmiVsAUjBcU 9FKRoFbszGOfj1iSK1UVjO6cnp8KmAfELG5YdEfmMxGcDI3pvF/+9uhp4OfBAiCRHJwZ Psbu9JgDzyvMmVB5kO++ThkGPiLToaezro9cXnHOSHRLeFXnpwQa/qQhaJlR/OaCiN/b mxJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=dEa6HUAGV2Vi5FBv33j49cRjhM4jWYoaU6HEBSFP9Mc=; b=a/1vGPsC6asFP+Q12njcS8Yr+eLZgsLesPQs58HrKTWD7+rxn5MQROLaEb6nHpsIaZ 8uMbXjDgXme30ULT+pRQldbS++FWFXeCyoUfvwRicy+aiT9qVg2iQO5MB+MBEmyBNKmv v5Ii/8IuidsJWEk7g7kbt9wJaXbNRzjcVLUi4wmIyFAJ20JWzsLYrfuwLSOzrAuQKVWP eme/Qh/4+DcloyDE3I0Ye17hDA0zUr5PPjG2kCgtGTgbZIqr2QrkycC5rTWq5tYgDotp qWcuUnM78z9YMZlKl443Rh5sj2H0W3Xj+M64hJw0mm1K/lEoH3exMrgHLmW02Jf3hEG4 dHrA== 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 j133si11262296pgc.543.2019.04.02.06.51.05; Tue, 02 Apr 2019 06:51:21 -0700 (PDT) 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 S1731817AbfDBNsc (ORCPT + 99 others); Tue, 2 Apr 2019 09:48:32 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:42860 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731174AbfDBNkC (ORCPT ); Tue, 2 Apr 2019 09:40:02 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJdv-0002n1-8n; Tue, 02 Apr 2019 14:39:59 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdu-0004s2-7l; Tue, 02 Apr 2019 14:39:58 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "=?UTF-8?Q?Rafa=C5=82=20?= =?UTF-8?Q?Mi=C5=82ecki?=" , "Larry Finger" , "Priit Laes" , "Kalle Valo" Date: Tue, 02 Apr 2019 14:38:27 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 20/99] b43: Fix error in cordic routine In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.65-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Larry Finger commit 8ea3819c0bbef57a51d8abe579e211033e861677 upstream. The cordic routine for calculating sines and cosines that was added in commit 6f98e62a9f1b ("b43: update cordic code to match current specs") contains an error whereby a quantity declared u32 can in fact go negative. This problem was detected by Priit Laes who is switching b43 to use the routine in the library functions of the kernel. Fixes: 986504540306 ("b43: make cordic common (LP-PHY and N-PHY need it)") Reported-by: Priit Laes Cc: Rafał Miłecki Signed-off-by: Larry Finger Signed-off-by: Priit Laes Signed-off-by: Kalle Valo [bwh: Backported to 3.16: adjust filename] Signed-off-by: Ben Hutchings --- drivers/net/wireless/b43/phy_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c @@ -596,7 +596,7 @@ struct b43_c32 b43_cordic(int theta) u8 i; s32 tmp; s8 signx = 1; - u32 angle = 0; + s32 angle = 0; struct b43_c32 ret = { .i = 39797, .q = 0, }; while (theta > (180 << 16))