From: John W. Linville Date: Thu, 5 Aug 2010 17:46:27 +0000 (-0400) Subject: rtl8180: avoid potential NULL deref in rtl8180_beacon_work X-Git-Tag: MMI-PSA29.97-13-9~22097^2~231^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8f1d2d2be73a98c21e68fe2a26f633892d4abdd1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git rtl8180: avoid potential NULL deref in rtl8180_beacon_work ieee80211_beacon_get can return NULL... Signed-off-by: John W. Linville Cc: stable@kernel.org --- diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c index 1d8178563d76..b50c39aaec05 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c @@ -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