]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix statistics leak if dev_alloc_name() fails
authorJohannes Berg <johannes.berg@intel.com>
Tue, 26 Apr 2016 11:47:08 +0000 (13:47 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 27 Apr 2016 08:06:58 +0000 (10:06 +0200)
commitc097c586e5b0a40812aadfbef3f874650dcde537
treeebe51f19da789d00e5015d6d952110b74456006b
parent5377e11b448421b506e29ab8d673fc2c535d7813
mac80211: fix statistics leak if dev_alloc_name() fails

In the case that dev_alloc_name() fails, e.g. because the name was
given by the user and already exists, we need to clean up properly
and free the per-CPU statistics. Fix that.

Cc: stable@vger.kernel.org
Fixes: 10e249e421a1 ("mac80211: use per-CPU TX/RX statistics")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/iface.c