aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-08-05 13:46:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-13 13:30:47 -0700
commitd3c5501ec90af293e011b036e9c5871b300d304e (patch)
treeeaed9e2ac5dbb21c8f970438379a99943bf2d6c1
parent563fd08347da83e595b07c8515b8b2f64033bcf6 (diff)
rtl8180: avoid potential NULL deref in rtl8180_beacon_work
commit 8f1d2d2be73a98c21e68fe2a26f633892d4abdd1 upstream. ieee80211_beacon_get can return NULL... Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180_dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
index 515817de290..15f09e81614 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -688,6 +688,8 @@ void rtl8180_beacon_work(struct work_struct *work)
/* grab a fresh beacon */
skb = ieee80211_beacon_get(dev, vif);
+ if (!skb)
+ goto resched;
/*
* update beacon timestamp w/ TSF value