From: Arik Nemtsov Date: Sat, 19 Nov 2011 08:51:26 +0000 (+0200) Subject: mac80211: dereference RCU protected probe_resp pointer correctly X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f724828bd3db7e0fe6f17ed8de2656bfbfed5c4e;p=openwrt%2Fstaging%2Fblogic.git mac80211: dereference RCU protected probe_resp pointer correctly This fixes a sparse warning: cfg.c:502:13: warning: incorrect type in assignment (different address spaces) cfg.c:502:13: expected struct sk_buff *old cfg.c:502:13: got struct sk_buff [noderef] *probe_resp Reported-by: Johannes Berg Signed-off-by: Arik Nemtsov Signed-off-by: John W. Linville --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index f947ac6bb67c..a29f06c0bcf0 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -509,7 +509,7 @@ static int ieee80211_set_probe_resp(struct ieee80211_sub_if_data *sdata, if (!resp || !resp_len) return -EINVAL; - old = sdata->u.ap.probe_resp; + old = rtnl_dereference(sdata->u.ap.probe_resp); new = dev_alloc_skb(resp_len); if (!new)