[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1448867812-11089-1-git-send-email-rahul.jain@samsung.com>
Date: Mon, 30 Nov 2015 12:46:52 +0530
From: Rahul Jain <rahul.jain@...sung.com>
To: kvalo@...eaurora.org
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Amit Khatri <amit.khatri@...sung.com>,
Rahul Jain <rahul.jain@...sung.com>
Subject: [PATCH] mac80211_hwsim: missing NULL check
From: Amit Khatri <amit.khatri@...sung.com>
txrate variable might be NULL and passing inside function
without NULL check.
Signed-off-by: Amit Khatri <amit.khatri@...sung.com>
Signed-off-by: Rahul Jain <rahul.jain@...sung.com>
---
drivers/net/wireless/mac80211_hwsim.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 194264c..72e4931 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -814,6 +814,9 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_skb);
struct ieee80211_rate *txrate = ieee80211_get_tx_rate(hw, info);
+ if (!txrate)
+ return;
+
if (!netif_running(hwsim_mon))
return;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists