From patchwork Tue May 15 09:04:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sushant Kumar Mishra X-Patchwork-Id: 10400687 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E1C3C601C8 for ; Tue, 15 May 2018 09:22:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2CF5286F8 for ; Tue, 15 May 2018 09:22:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B782E286FB; Tue, 15 May 2018 09:22:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B0AE286F8 for ; Tue, 15 May 2018 09:22:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594AbeEOJWg (ORCPT ); Tue, 15 May 2018 05:22:36 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:33078 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752481AbeEOJWe (ORCPT ); Tue, 15 May 2018 05:22:34 -0400 Received: by mail-pl0-f67.google.com with SMTP id n10-v6so9070068plp.0 for ; Tue, 15 May 2018 02:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FufnVFpRM9kd0U2BCziuc/sKAQ4oDhDE8KzU0IJivVs=; b=mdXwraiG/R0sdbZupTAxub+WFnfBpz0c8ExHJqvs70LHjYs+dVAjgJRqltdGNli4MH UhwqqdrBpiT42PAnFUG53ZgmfaY+p4qwLt7Zmxr10luH4S4j+hUuJvwGjzOQjYpwZSRF J/DuEYOmqP2Qd3EQVha6wZNo2/C+T10rKULieoERAOSviariizonncWFvPAelYG5Vuc9 yTiia4yEnX4wpEtrb6zFJwIboq1p5xTqtM5GUu6gPucYNu46ch+CXfdGyJLeRdRZIoRO P1XvwmJHc+G+iPXPZKCHr+aIs3eZyu28lRKQg6nwC0WK7he/89jUT2PsFpT/wM72Xp+d iTeg== 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; bh=FufnVFpRM9kd0U2BCziuc/sKAQ4oDhDE8KzU0IJivVs=; b=K+wQKECjfSXGw0P6Or9Y53CJ6/yTtWxuQih2a32qb2mHAsRU2ZDlpRaXyMhF7NcB+n sxJWpFLwCFbPteDYgdJjlUCyupeky7kZyJ1zCUemUzBhAHG+ULv2Klg2aJ+45y5cUyfV L+MrLTHxZrINzvesUmYBFLkKtBSNQBV3oxcVLQqmcn6DHcsDLyqzKbARTjoSQb1GI6lo /S5L9+9O6ZafQQ2f3Vz4of7/UGWG7xCyJB3WsVw5cx0ZLjC7E0cHxmdQj/bTtdr/3SmH WFGJ6hRVPuiJia2rfe1ZU2XVxJEmye0RTyCoKfQu6irZnWwsVTu+Y/dSLTMe/0Fu7gQP O8Ng== X-Gm-Message-State: ALKqPwcdG/rPodlWp4J6F3mJJ2IpP2Ef+HefrrVCWHKzpyrEzsZ+QDpB ekUgQMk+5+UIpYd/COzc8kE= X-Google-Smtp-Source: AB8JxZrrTzwr8z6OvNSFnJ73EOgW0fDyp3u47VhMGiQO67bYub4/thl86s92FuzGkfBf02A+znYAOw== X-Received: by 2002:a17:902:7008:: with SMTP id y8-v6mr13506118plk.141.1526376153376; Tue, 15 May 2018 02:22:33 -0700 (PDT) Received: from cpu188.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id a28-v6sm24174091pfl.86.2018.05.15.02.22.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 02:22:32 -0700 (PDT) From: Sushant Kumar Mishra To: Kalle Valo Cc: Sushant Kumar Mishra , linux-wireless@vger.kernel.org, Amitkumar Karwar , Siva Rebbagondla , Sanjay Konduri Subject: [PATCH 1/2] rsi: add fix for crash during assertions Date: Tue, 15 May 2018 14:34:30 +0530 Message-Id: <1526375071-7010-1-git-send-email-sushant2k1513@gmail.com> X-Mailer: git-send-email 2.1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sanjay Konduri 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 --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index 3faa044..bfa7569 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -245,6 +245,7 @@ void rsi_mac80211_detach(struct rsi_hw *adapter) ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); + adapter->hw = NULL; } for (band = 0; band < NUM_NL80211_BANDS; band++) {