Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13475582ybl; Sun, 29 Dec 2019 12:48:52 -0800 (PST) X-Google-Smtp-Source: APXvYqygi5qnSCk2wVuO7PIC+Nl0OtXCANytCl/5He55qkGZug1m/lYulxUthDuIlLzBCAjgA6j8 X-Received: by 2002:a9d:650f:: with SMTP id i15mr53419714otl.97.1577652532776; Sun, 29 Dec 2019 12:48:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652532; cv=none; d=google.com; s=arc-20160816; b=cnM9fdesQ2S+63KamUgEWdJRYn9xV1Dd/3kj3801MJI9C3MENqXRh69703jQAKzILf T2+cteAvPtVoeDuldH0i+YNKJyiS9EzEZE5V2/FCFgbzfn5tssoi7Vaxg19/0ex3lGmj Q6nndzcUy2whJyVuso9kIQS4dAJ2opIeWPhU1kV7Pr49xopEa/HdjdGEEDS3q4z3IaHm A5y+WptkgauA+C+N6jnlGIkL5JiGyWKrDPWyqCIkTJiJT/Ueg7kN85wRXeDZdSFbUFeF Y13QP0tcSVcZVVJVidILUjWAQTlzuKzGh4RBQ8HX0aQpfvlXTJUimsh7wOjFR79qHfZs GRQg== 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=nOCjaYc9p6T2y+PYLyBXOADbsxE72pVBPoCycbc9iAY=; b=F9et6U3/FNENYSJ3rztHBVd9JgmdFuzQEeynZkL6ceHV98Ko6RH9CBepBSIv998atK 3rQo31dNBFdWCj3toD8dja/7ESn7m7/O9/DzoiiDm4fLSkDyJCr6E8g0pn6oXQu8670A vp8r6UhRL7o1oqvbjuymOWyWtmOhRA4qHV2Clw8VOc9u0ZJCCWzV3q10jOgbox6beIS7 mQfrg4tF8joEAjqiQ3iBaAl80ECwn72PZ0lP4AS7QSQFdjSxUw06/AAGCTuv2/RMZtVz p/S8lPNB/0Hy++lAXdbJ9CP3d6Ll/t4wOGf6e9Pn9Bm0+xHXp8phvKt2irOa4Q7t/CVL FgdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="B2j0+/46"; 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 n14si22947754otk.179.2019.12.29.12.48.42; Sun, 29 Dec 2019 12:48:52 -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="B2j0+/46"; 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 S1732540AbfL2Rxr (ORCPT + 99 others); Sun, 29 Dec 2019 12:53:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:40928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729371AbfL2Rxo (ORCPT ); Sun, 29 Dec 2019 12:53:44 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 B4F5221D7E; Sun, 29 Dec 2019 17:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642024; bh=A1FOVV26f2ggY+vCfaKrBDnzf+4YILXKM85+hxAUp5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B2j0+/46xjfgoXFXUzMBJmckPqwA5VC1E8OIo30DMp/lsLW67FBAV64pbxnaTs7VY P/dmv7UAuxNs2gllxuRHfUzg78QqOPtH0eoEUSp+7N02PKgDajL6IwqLdPxtY3OxTt 14yUMgopzZmEWkBX8Q7bNorGkmFEdsRHt/enaJKs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wang Xuerui , Luca Coelho , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 309/434] iwlwifi: mvm: fix unaligned read of rx_pkt_status Date: Sun, 29 Dec 2019 18:26:02 +0100 Message-Id: <20191229172722.478297888@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Wang Xuerui [ Upstream commit c5aaa8be29b25dfe1731e9a8b19fd91b7b789ee3 ] This is present since the introduction of iwlmvm. Example stack trace on MIPS: [] iwl_mvm_rx_rx_mpdu+0xa8/0xb88 [iwlmvm] [] iwl_pcie_rx_handle+0x420/0xc48 [iwlwifi] Tested with a Wireless AC 7265 for ~6 months, confirmed to fix the problem. No other unaligned accesses are spotted yet. Signed-off-by: Wang Xuerui Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c index 0ad8ed23a455..5ee33c8ae9d2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c @@ -60,6 +60,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ +#include #include #include #include "iwl-trans.h" @@ -357,7 +358,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, rx_res = (struct iwl_rx_mpdu_res_start *)pkt->data; hdr = (struct ieee80211_hdr *)(pkt->data + sizeof(*rx_res)); len = le16_to_cpu(rx_res->byte_count); - rx_pkt_status = le32_to_cpup((__le32 *) + rx_pkt_status = get_unaligned_le32((__le32 *) (pkt->data + sizeof(*rx_res) + len)); /* Dont use dev_alloc_skb(), we'll have enough headroom once -- 2.20.1