Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp648534imu; Fri, 11 Jan 2019 06:46:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN7UBUlOHM8HAEJEOqGaax+TzTiPxHeR4j71xyMWbxlAsDLSJ38h1HSjJztsUbnKZuGavnth X-Received: by 2002:a17:902:4:: with SMTP id 4mr14969181pla.20.1547218019588; Fri, 11 Jan 2019 06:46:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547218019; cv=none; d=google.com; s=arc-20160816; b=Q/gZN4oZCu+qc+5PXY9x58wivQjadVkarxx+F7jXYSY26PAe0x4+DLotm4DfvBMMb5 KfuGi3/zdzai/+DXI3K6zTEhmKOofVhZ1ax++WYdxdD9x6lIMQBm2uZm1/OWL1//orUj cw7BVeDi3R6T57ZzNj8l5OjD78TvgM3W/MhxURmIz1HLVtTHwPi+SlzINg7o9NkqGqjx 9zcQtjPjB/AwZNNhk0ZiIVsG4WiDaPlp6dDuMzg8Ee6mlrdwiyC9+GxURE7b4/1VS/jS le5y41EHDEjJNY0AuvIld56aQ+g7xwDITt6ksph06GRLP9+dq8qDgcfDMhMaZVO2VmwA Cr1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Xaxs/TpfvzWyd4JpQXk5cxMKdY75SiV+l/2/2EWxDNU=; b=WGGKaaGUudTKac65vYv1qtDmpQ+9RmZY9QkqBhd2QyJ04uI2LWl8xCYidurnbSvBzf BQxvX12oJuZKxPlSRoznhmb227GFi+Gyj8ELpYem6HepCuvRAQC7amudHUBsiyoCipHi Au99kNfqOduZQkYipdGVSmc8fA6UmwMDokGNkG4F+JU+qv/F298Br2AOaZSjcfNZDhtk Bjn284hJTsZeAOuGTP99aD9nTbGmVs+8r6Ib3tupWAGjFkJD4878EcxEEeCAlT7IygAw hqwbu1UlTPPzdM0uEhcQCR6s48Smepm/tvvG2y0dq+wTHjcAhrtiEFnyUDQCzuZ/lnR0 K8kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NgY0o7Q+; 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 q140si70751153pfc.20.2019.01.11.06.46.44; Fri, 11 Jan 2019 06:46:59 -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; dkim=pass header.i=@kernel.org header.s=default header.b=NgY0o7Q+; 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 S2391408AbfAKOpF (ORCPT + 99 others); Fri, 11 Jan 2019 09:45:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:37284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404589AbfAKOoU (ORCPT ); Fri, 11 Jan 2019 09:44:20 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C610206B6; Fri, 11 Jan 2019 14:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547217859; bh=uNoZ03c9MBSJ4r+9LOqND5E71pDBH8Uh77c89KOOixc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NgY0o7Q+0dSFfHCSvm7TVi1MAj3vl45ieS3nDDAQkI9qllBLXQiyR4WbO7Y9W2vt5 NANqW6IOcLeq779a30yjJ3L+lWGBIInDqQZh9Z5NZunQhBRU00gC41x5rAsfJBdRhu yn9IM70G0Atqtn5n3bHKledGZFoPiQsDqgYRkSjU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Priit Laes , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Larry Finger , Kalle Valo Subject: [PATCH 4.20 35/65] b43: Fix error in cordic routine Date: Fri, 11 Jan 2019 15:15:21 +0100 Message-Id: <20190111131101.191291619@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131055.331350141@linuxfoundation.org> References: <20190111131055.331350141@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable 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 Cc: Stable # 2.6.34 Signed-off-by: Larry Finger Signed-off-by: Priit Laes Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/broadcom/b43/phy_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/broadcom/b43/phy_common.c +++ b/drivers/net/wireless/broadcom/b43/phy_common.c @@ -616,7 +616,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))