rtl8180: avoid potential NULL deref in rtl8180_beacon_work
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Aug 2010 17:46:27 +0000 (13:46 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Aug 2010 20:05:27 +0000 (16:05 -0400)
ieee80211_beacon_get can return NULL...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: stable@kernel.org
drivers/net/wireless/rtl818x/rtl8180_dev.c

index 1d8178563d76205d063d0147bd837d2d6d7ab41a..b50c39aaec0522e63c89b30ad6cc6433747b6853 100644 (file)
@@ -695,6 +695,8 @@ static 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