Message ID | 20200803121900.958223920@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=5b7Y=BN=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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, 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 F16C4C433E1 for <stable@archiver.kernel.org>; Mon, 3 Aug 2020 12:29:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D17B2208B3 for <stable@archiver.kernel.org>; Mon, 3 Aug 2020 12:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596457775; bh=2p0RX5zCSgS9Ba6CF+WarrcyVNe21ABsL3/IG4LdK54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=z9bpweDOgGZboEtccxf37XkzAykm0rfCaTT7dmb+fJ1UsA6EoNOzQ0ZUVe1Xws05n blm5OgXvgFyvk8PqCg1fELUYGzsnD7o4lrIYeRCgWUqk5RjMn7Ab3dh/B7VvqdhAdX vJYOcBP8mivHofvPngvPCxpKKo9Q+canpggg2HKM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728932AbgHCM3f (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 3 Aug 2020 08:29:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:56170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728929AbgHCM3e (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 3 Aug 2020 08:29:34 -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 826A5208B3; Mon, 3 Aug 2020 12:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596457773; bh=2p0RX5zCSgS9Ba6CF+WarrcyVNe21ABsL3/IG4LdK54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jw4U8oPYnD3qrmBlK2ET7yvxDWlzkVcvnnLENPWaVfVwjMP9WHesGfMYddKrG7pQB BSkb7Ri7j7qYb2qPZBToD4XiTbQiMXfPPfqtAhzUl/E1NWyvrHOMfTxL4NQ1PEZZ5v QGQYLKQF+3aXWzEAR2t+L77tEhwyRC4cei4g3yZ0= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Taehee Yoo <ap420073@gmail.com>, Roopa Prabhu <roopa@cumulusnetworks.com>, "David S. Miller" <davem@davemloft.net>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 5.4 69/90] vxlan: fix memleak of fdb Date: Mon, 3 Aug 2020 14:19:31 +0200 Message-Id: <20200803121900.958223920@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200803121857.546052424@linuxfoundation.org> References: <20200803121857.546052424@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
|
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 03434db36b5c7..b49b6f0cee500 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2863,8 +2863,10 @@ static void vxlan_flush(struct vxlan_dev *vxlan, bool do_all) if (!do_all && (f->state & (NUD_PERMANENT | NUD_NOARP))) continue; /* the all_zeros_mac entry is deleted at vxlan_uninit */ - if (!is_zero_ether_addr(f->eth_addr)) - vxlan_fdb_destroy(vxlan, f, true, true); + if (is_zero_ether_addr(f->eth_addr) && + f->vni == vxlan->cfg.vni) + continue; + vxlan_fdb_destroy(vxlan, f, true, true); } spin_unlock_bh(&vxlan->hash_lock[h]); }