Message ID | 20200319123941.474938250@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=1QoN=5E=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0775C4332D for <stable@archiver.kernel.org>; Thu, 19 Mar 2020 13:07:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9521120836 for <stable@archiver.kernel.org>; Thu, 19 Mar 2020 13:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623233; bh=Bm39ZwFROQyEHnHhoSvNMfV+9apEoX6s5tzPInHM3RU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=A9JYM25WLbQTX0St6ywcFZzpvfF/7A8XdY8ML13kpsHGPC3aT8+TPiJ9JMP/MX0tk PTJb0gTtOAayv0BeZg1PemhX38zw8cogapN3FWKAc3F8myi7+jihGXKbwatNMWzGLk 2ykxF+gfcl/Z9Z2QDgTmRpdt2xKY8+MTwI8O/+DQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbgCSNHM (ORCPT <rfc822;stable@archiver.kernel.org>); Thu, 19 Mar 2020 09:07:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:50714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727822AbgCSNHL (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 19 Mar 2020 09:07:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1ADE32080C; Thu, 19 Mar 2020 13:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623230; bh=Bm39ZwFROQyEHnHhoSvNMfV+9apEoX6s5tzPInHM3RU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M2BsZQTVpp3hSK9STxJIC7N2xElYykpW3UWbNOL7Sc5GzOaAf8oznkFg/aFX6Col5 P+WuUzt9cm4HYhUaNzxC//hESPJfsCvdNpT8ky/woRD9HdILw6REKJaoaVy/V9sVLa Silyk/EbdFojXSpYLcvAmOBspeokDsc2us9h9WLk= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sven Eckelmann <sven@narfation.org>, Antonio Quartulli <a@unstable.cc>, Marek Lindner <mareklindner@neomailbox.ch>, "David S. Miller" <davem@davemloft.net> Subject: [PATCH 4.4 52/93] batman-adv: Clean up untagged vlan when destroying via rtnl-link Date: Thu, 19 Mar 2020 13:59:56 +0100 Message-Id: <20200319123941.474938250@linuxfoundation.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200319123924.795019515@linuxfoundation.org> References: <20200319123924.795019515@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -1000,7 +1000,9 @@ void batadv_softif_destroy_sysfs(struct static void batadv_softif_destroy_netlink(struct net_device *soft_iface, struct list_head *head) { + struct batadv_priv *bat_priv = netdev_priv(soft_iface); struct batadv_hard_iface *hard_iface; + struct batadv_softif_vlan *vlan; list_for_each_entry(hard_iface, &batadv_hardif_list, list) { if (hard_iface->soft_iface == soft_iface) @@ -1008,6 +1010,13 @@ static void batadv_softif_destroy_netlin BATADV_IF_CLEANUP_KEEP); } + /* destroy the "untagged" VLAN */ + vlan = batadv_softif_vlan_get(bat_priv, BATADV_NO_FLAGS); + if (vlan) { + batadv_softif_destroy_vlan(bat_priv, vlan); + batadv_softif_vlan_free_ref(vlan); + } + batadv_sysfs_del_meshif(soft_iface); unregister_netdevice_queue(soft_iface, head); }