If a network interface is down while setting a channel, missing null pointer check causes an oops in cfg80211_set_freq: # iw phy phy0 interface add ath1 type monitor # iw dev ath1 set channel 3 Unable to handle kernel paging request for data at address 0x00000004 Faulting instruction address: 0xca16d778 Oops: Kernel access of bad area, sig: 11 [#1] ... Signed-off-by: Jussi Haakana <Jussi.Haakana@xxxxxxxxxxx> --- net/wireless/chan.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/wireless/chan.c b/net/wireless/chan.c index d92d088..b01a6f6 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -50,7 +50,7 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev, struct ieee80211_channel *chan; int result; - if (wdev->iftype == NL80211_IFTYPE_MONITOR) + if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) wdev = NULL; if (wdev) { -- 1.5.5.6 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html