archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Fix null pointer dereference with iTXQ support
@ 2017-07-08  0:03 Chunho Lee
  0 siblings, 0 replies; only message in thread
From: Chunho Lee @ 2017-07-08  0:03 UTC (permalink / raw)
  Cc: ch.lee, thomas.kang, Johannes Berg, David S. Miller,
	open list:MAC80211, open list:NETWORKING [GENERAL],
	open list

This change adds null pointer check before dereferencing pointer dev on
netif_tx_start_all_queues() when an interface is added.
With iTXQ support, netif_tx_start_all_queues() is always called while
an interface is added. however, the netdev queues are not associated
and dev is null when the interface is either NL80211_IFTYPE_P2P_DEVICE
or NL80211_IFTYPE_NAN.

Signed-off-by: Chunho Lee <>
 net/mac80211/iface.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index f5f5015..e2edd10 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -731,7 +731,8 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
 	    sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
 	    local->ops->wake_tx_queue) {
 		/* XXX: for AP_VLAN, actually track AP queues */
-		netif_tx_start_all_queues(dev);
+		if (dev)
+			netif_tx_start_all_queues(dev);
 	} else if (dev) {
 		unsigned long flags;
 		int n_acs = IEEE80211_NUM_ACS;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-08  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-08  0:03 [PATCH] mac80211: Fix null pointer dereference with iTXQ support Chunho Lee

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).