Skip to content

Commit

Permalink
mac80211: dereference RCU protected probe_resp pointer correctly
Browse files Browse the repository at this point in the history
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] <asn:4>*probe_resp

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Arik Nemtsov authored and John W. Linville committed Nov 28, 2011
1 parent 6674f21 commit f724828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f724828

Please sign in to comment.