* [PATCH] mac80211_hwsim: missing NULL check
@ 2015-11-30 7:16 Rahul Jain
2015-12-02 9:51 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Rahul Jain @ 2015-11-30 7:16 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, netdev, linux-kernel, Amit Khatri, Rahul Jain
From: Amit Khatri <amit.khatri@samsung.com>
txrate variable might be NULL and passing inside function
without NULL check.
Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211_hwsim: missing NULL check
2015-11-30 7:16 [PATCH] mac80211_hwsim: missing NULL check Rahul Jain
@ 2015-12-02 9:51 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-12-02 9:51 UTC (permalink / raw)
To: Rahul Jain, kvalo; +Cc: linux-wireless, netdev, linux-kernel, Amit Khatri
On Mon, 2015-11-30 at 12:46 +0530, Rahul Jain wrote:
> From: Amit Khatri <amit.khatri@samsung.com>
>
> txrate variable might be NULL and passing inside function
> without NULL check.
Applied. However, this comes with a big BUT.
I seems to always be rewriting your static checker patches, or asking
for clarification, rewording, etc.
Please: review what I did to this commit, and in the future please
submit patches that actually describe what's going on, what you're
doing, and why you're doing it.
IOW, analyse the code and don't just do the minimum necessary to shut
up the static checker. Doing that is fairly much useless, especially in
really obscure cases like this.
I'm going to drop further patches like this one without warning.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-02 9:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 7:16 [PATCH] mac80211_hwsim: missing NULL check Rahul Jain
2015-12-02 9:51 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).