Skip to content

Commit

Permalink
mac80211: Ensure initializing private mc_list in prepare_multicast().
Browse files Browse the repository at this point in the history
Fix kernel panic by NULL pointer dereference in the context of
ieee80211_ops->prepare_multicast().

This bug was introduced by commit 22bedad.. ("net: convert
multicast list to list_head").

Call __hw_addr_init() in ieee80211_alloc_hw() to initialize
list_head of private device multicast list, like we do in
bond_init().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Apr 6, 2010
1 parent e400827 commit 2f787b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
local->uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;

INIT_LIST_HEAD(&local->interfaces);

__hw_addr_init(&local->mc_list);

mutex_init(&local->iflist_mtx);
mutex_init(&local->scan_mtx);

Expand Down

0 comments on commit 2f787b0

Please sign in to comment.