* [PATCH net] mac80211: free netdev on dev_alloc_name() error
@ 2017-06-09 19:33 Johannes Berg
2017-06-09 19:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2017-06-09 19:33 UTC (permalink / raw)
To: linux-wireless, netdev; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
The change to remove free_netdev() from ieee80211_if_free()
erroneously didn't add the necessary free_netdev() for when
ieee80211_if_free() is called directly in one place, rather
than as the priv_destructor. Add the missing call.
Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/iface.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 915d7e1b4545..f5f50150ba1c 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1816,6 +1816,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
ret = dev_alloc_name(ndev, ndev->name);
if (ret < 0) {
ieee80211_if_free(ndev);
+ free_netdev(ndev);
return ret;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] mac80211: free netdev on dev_alloc_name() error
2017-06-09 19:33 [PATCH net] mac80211: free netdev on dev_alloc_name() error Johannes Berg
@ 2017-06-09 19:40 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-06-09 19:40 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, netdev, johannes.berg
From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 9 Jun 2017 21:33:09 +0200
> From: Johannes Berg <johannes.berg@intel.com>
>
> The change to remove free_netdev() from ieee80211_if_free()
> erroneously didn't add the necessary free_netdev() for when
> ieee80211_if_free() is called directly in one place, rather
> than as the priv_destructor. Add the missing call.
>
> Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.")
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Applied, thanks Johannes.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-09 19:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-09 19:33 [PATCH net] mac80211: free netdev on dev_alloc_name() error Johannes Berg
2017-06-09 19:40 ` David Miller
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).