]> git.baikalelectronics.ru Git - 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)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Sep 2014 09:13:14 +0000 (11:13 +0200)
commitd9c37f3d4bb4782c2f0b6bbe0ff8f1692fdd3f58
tree9b4c5e04fe46ab3c7287620e1d356cb0ab68eb04
parent0c409d81bcb4c83afe333b62541ff40faba7da8c
nl80211: clear skb cb before passing to netlink

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.

Cc: stable@vger.kernel.org [this goes way back]
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>
net/wireless/nl80211.c