* Patch "mac80211: fix statistics leak if dev_alloc_name() fails" has been added to the 4.5-stable tree
@ 2016-05-06 18:13 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-05-06 18:13 UTC (permalink / raw)
To: johannes.berg, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
mac80211: fix statistics leak if dev_alloc_name() fails
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mac80211-fix-statistics-leak-if-dev_alloc_name-fails.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From e6436be21e77e3659b4ff7e357ab5a8342d132d2 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@intel.com>
Date: Tue, 26 Apr 2016 13:47:08 +0200
Subject: mac80211: fix statistics leak if dev_alloc_name() fails
From: Johannes Berg <johannes.berg@intel.com>
commit e6436be21e77e3659b4ff7e357ab5a8342d132d2 upstream.
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.
Fixes: 5a490510ba5f ("mac80211: use per-CPU TX/RX statistics")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/mac80211/iface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1750,7 +1750,7 @@ int ieee80211_if_add(struct ieee80211_lo
ret = dev_alloc_name(ndev, ndev->name);
if (ret < 0) {
- free_netdev(ndev);
+ ieee80211_if_free(ndev);
return ret;
}
@@ -1836,7 +1836,7 @@ int ieee80211_if_add(struct ieee80211_lo
ret = register_netdevice(ndev);
if (ret) {
- free_netdev(ndev);
+ ieee80211_if_free(ndev);
return ret;
}
}
Patches currently in stable-queue which might be from johannes.berg@intel.com are
queue-4.5/mac80211-fix-statistics-leak-if-dev_alloc_name-fails.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-06 18:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06 18:13 Patch "mac80211: fix statistics leak if dev_alloc_name() fails" has been added to the 4.5-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).