From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933705AbdGCODL (ORCPT ); Mon, 3 Jul 2017 10:03:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38204 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933565AbdGCNrx (ORCPT ); Mon, 3 Jul 2017 09:47:53 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , "David S. Miller" Subject: [PATCH 4.11 04/84] mac80211: free netdev on dev_alloc_name() error Date: Mon, 3 Jul 2017 15:34:44 +0200 Message-Id: <20170703133403.171170319@linuxfoundation.org> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170703133402.874816941@linuxfoundation.org> References: <20170703133402.874816941@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.11-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johannes Berg [ Upstream commit c7a61cba71fd151cc7d9ebe53a090e0e61eeebf3 ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/mac80211/iface.c | 1 + 1 file changed, 1 insertion(+) --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -1810,6 +1810,7 @@ int ieee80211_if_add(struct ieee80211_lo ret = dev_alloc_name(ndev, ndev->name); if (ret < 0) { ieee80211_if_free(ndev); + free_netdev(ndev); return ret; }