From patchwork Wed Jan 22 09:28:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFC35C2D0DB for ; Wed, 22 Jan 2020 09:33:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CF912467A for ; Wed, 22 Jan 2020 09:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579685635; bh=0wWvWshp+tvgSFI8pOHOJrx1Z8wnPY0sv8HdFJhYBDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1WSWHUjovMWJZSa3kA6iVagiJVi+pLEPP1wWqjPbsrWxnSfKAQ/MyRWm32iwHXdUc OO56/cHlKfc9mn8AlMyMpk1cHtgo5PmxfVi570Ly3nZEBaym01d1INjwlkILPIRN57 YW8k/R1ctbcMI+YaUKzE31Gs08DsXVVlFha22gBg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729668AbgAVJdy (ORCPT ); Wed, 22 Jan 2020 04:33:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:48048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730063AbgAVJdx (ORCPT ); Wed, 22 Jan 2020 04:33:53 -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 0BA802071E; Wed, 22 Jan 2020 09:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579685633; bh=0wWvWshp+tvgSFI8pOHOJrx1Z8wnPY0sv8HdFJhYBDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rme50aIieASfpVAOLsMFtn73Uzc8i1vqbYvZ0E72s2IF3URu+Dn4QdPHule5Gz4r2 9fw5cXh3EQIjLRabauMVTQXgVIDwSB4EOdOCPcqwVfopbbieUUBto5oQmUWqf17SZu K1u6giEPx3PRZY8mUa0L1AIiBIFqMO11EOM9sDUM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sanjay Konduri , Sushant Kumar Mishra , Kalle Valo , Ben Hutchings Subject: [PATCH 4.9 06/97] rsi: add fix for crash during assertions Date: Wed, 22 Jan 2020 10:28:10 +0100 Message-Id: <20200122092756.754932862@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092755.678349497@linuxfoundation.org> References: <20200122092755.678349497@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Sanjay Konduri commit abd39c6ded9db53aa44c2540092bdd5fb6590fa8 upstream. Observed crash in some scenarios when assertion has occurred, this is because hw structure is freed and is tried to get accessed in some functions where null check is already present. So, avoided the crash by making the hw to NULL after freeing. Signed-off-by: Sanjay Konduri Signed-off-by: Sushant Kumar Mishra Signed-off-by: Kalle Valo Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -199,6 +199,7 @@ void rsi_mac80211_detach(struct rsi_hw * ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); + adapter->hw = NULL; } rsi_remove_dbgfs(adapter);