* re: mac80211: avoid allocating TXQs that won't be used
@ 2017-09-20 16:08 Colin Ian King
2017-09-20 17:51 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2017-09-20 16:08 UTC (permalink / raw)
To: Johannes Berg
Cc: David S. Miller, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org
Johannes,
Static analysis with CoverityScan on linux-next today detected a null
pointer dereference issue on commit:
>From 0fc4b3403d215ecd3c05505ec1f0028a227ed319 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@intel.com>
Date: Thu, 22 Jun 2017 12:20:29 +0200
Subject: [PATCH] mac80211: avoid allocating TXQs that won't be used
Issue: sdata is null when the sdata is dereferenced by:
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
sdata->vif.type != NL80211_IFTYPE_MONITOR)
note that sdata is assigned a non-null much later with the statement
sdata = netdev_priv(ndev).
Detected by CoverityScan CID#1456974 ("Explicit null dereferenced")
Colin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mac80211: avoid allocating TXQs that won't be used
@ 2017-09-20 17:51 ` Johannes Berg
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2017-09-20 17:51 UTC (permalink / raw)
To: Colin Ian King
Cc: David S. Miller, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org
On Wed, 2017-09-20 at 17:08 +0100, Colin Ian King wrote:
> Johannes,
>
> Static analysis with CoverityScan on linux-next today detected a null
> pointer dereference issue on commit:
>
> From 0fc4b3403d215ecd3c05505ec1f0028a227ed319 Mon Sep 17 00:00:00
> 2001
> From: Johannes Berg <johannes.berg@intel.com>
> Date: Thu, 22 Jun 2017 12:20:29 +0200
> Subject: [PATCH] mac80211: avoid allocating TXQs that won't be used
>
> Issue: sdata is null when the sdata is dereferenced by:
>
> sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
> sdata->vif.type != NL80211_IFTYPE_MONITOR)
>
> note that sdata is assigned a non-null much later with the statement
> sdata = netdev_priv(ndev).
Yeah, umm, that should be checking just 'type'. Thanks, will fix.
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mac80211: avoid allocating TXQs that won't be used
@ 2017-09-20 17:51 ` Johannes Berg
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2017-09-20 17:51 UTC (permalink / raw)
To: Colin Ian King
Cc: David S. Miller,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Wed, 2017-09-20 at 17:08 +0100, Colin Ian King wrote:
> Johannes,
>
> Static analysis with CoverityScan on linux-next today detected a null
> pointer dereference issue on commit:
>
> From 0fc4b3403d215ecd3c05505ec1f0028a227ed319 Mon Sep 17 00:00:00
> 2001
> From: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Date: Thu, 22 Jun 2017 12:20:29 +0200
> Subject: [PATCH] mac80211: avoid allocating TXQs that won't be used
>
> Issue: sdata is null when the sdata is dereferenced by:
>
> sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
> sdata->vif.type != NL80211_IFTYPE_MONITOR)
>
> note that sdata is assigned a non-null much later with the statement
> sdata = netdev_priv(ndev).
Yeah, umm, that should be checking just 'type'. Thanks, will fix.
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-20 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-20 16:08 mac80211: avoid allocating TXQs that won't be used Colin Ian King
2017-09-20 17:51 ` Johannes Berg
2017-09-20 17:51 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.