Message ID | 20210208145812.578790260@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 9570AC43381 for <stable@archiver.kernel.org>; Mon, 8 Feb 2021 15:24:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4970864EAC for <stable@archiver.kernel.org>; Mon, 8 Feb 2021 15:24:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232181AbhBHPYP (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 8 Feb 2021 10:24:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:33700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233349AbhBHPRa (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 8 Feb 2021 10:17:30 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 937B664EBE; Mon, 8 Feb 2021 15:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797106; bh=LKo9ZrO5UM2oPV6T3WVJdK3dskGNrGC1mz/F6YR38OE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IpaMx5pKo3ESYNTJuJ3H8vf8MItHemLbhB4AkaTgofcxKvONKOcs0etl6uVD/oCDa 9+xO3qfZbaAGnRxpDuA/il15LUXeIEMDSr22enKxZtAXUu4p6tnhlkGeRqbWR1kudE Lsjnd2C+YnG77msDu5jOp+8HIbH0zhi51GkgUUkE= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Chinmay Agarwal <chinagar@codeaurora.org>, Cong Wang <xiyou.wangcong@gmail.com>, David Ahern <dsahern@kernel.org>, Jakub Kicinski <kuba@kernel.org> Subject: [PATCH 5.4 61/65] neighbour: Prevent a dead entry from updating gc_list Date: Mon, 8 Feb 2021 16:01:33 +0100 Message-Id: <20210208145812.578790260@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145810.230485165@linuxfoundation.org> References: <20210208145810.230485165@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1244,13 +1244,14 @@ static int __neigh_update(struct neighbo old = neigh->nud_state; err = -EPERM; - if (!(flags & NEIGH_UPDATE_F_ADMIN) && - (old & (NUD_NOARP | NUD_PERMANENT))) - goto out; if (neigh->dead) { NL_SET_ERR_MSG(extack, "Neighbor entry is now dead"); + new = old; goto out; } + if (!(flags & NEIGH_UPDATE_F_ADMIN) && + (old & (NUD_NOARP | NUD_PERMANENT))) + goto out; ext_learn_change = neigh_update_ext_learned(neigh, flags, ¬ify);