]> git.ipfire.org Git - people/arne_f/kernel.git/commit
nl80211: clear skb cb before passing to netlink
authorJohannes Berg <johannes.berg@intel.com>
Wed, 30 Jul 2014 12:55:26 +0000 (14:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Oct 2014 19:18:43 +0000 (12:18 -0700)
commit7dd311128022551d7876b26b7193157883494cd3
treec650edc5bb6d5097ae7f33a0d3743a6abfa378e3
parent6353c97aa7c7dd6b0c3fe717eeacb39e3873259e
nl80211: clear skb cb before passing to netlink

commit bd8c78e78d5011d8111bc2533ee73b13a3bd6c42 upstream.

In testmode and vendor command reply/event SKBs we use the
skb cb data to store nl80211 parameters between allocation
and sending. This causes the code for CONFIG_NETLINK_MMAP
to get confused, because it takes ownership of the skb cb
data when the SKB is handed off to netlink, and it doesn't
explicitly clear it.

Clear the skb cb explicitly when we're done and before it
gets passed to netlink to avoid this issue.

Reported-by: Assaf Azulay <assaf.azulay@intel.com>
Reported-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/wireless/nl80211.c