Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3492720pxf; Mon, 29 Mar 2021 03:55:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjNihg1dvlnCB3lyeltC58hb6dvK19Xw69vuoYxDnfZ/rWgb6La1h/Y/8XdPBuecK24Eth X-Received: by 2002:a17:906:2312:: with SMTP id l18mr28538833eja.468.1617015333657; Mon, 29 Mar 2021 03:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617015333; cv=none; d=google.com; s=arc-20160816; b=LN+kfyHfLiIhWMjGDPn2MueGd0r9MMVjg0TEJKC413x8j1/Ttm7mi4AaQ6vEhhobbQ FfN4JtMOWjaxASYO79x98vMbCBR8oH449XnUqwr8uOAHmjrCHFzraRqhMy8UfZMh3Lg7 ME71y8nKAuFx81gFPVPZzYrWAAn7lbfnuQ4LxXLh3E2XMpLVuFLTHD8Ddwtvas27NRMj Xa1mQg9AjtaJ0/xXrdoD7SDxmlEEkQawBmma0IgXsZaUrG9gnK4eHochsgMKn1BxQdoj ZRQ2xPYrsfV1m1HMR2AOrqr2W34/YGODwfy8bCEkvDdhgEIcl93/joVLtyNSV+a4apBy SPJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JL2JnunPzm2GdaDy3lx7SOTyw9oAANodpqXtGL2M8f0=; b=ZGvnveMEz4uHfoAsPNUY6BqdczqEBp8305T2wUYIzR+TUubEC6O0hb9OsQ2quLQYwQ +XEfokouiVR8IEIx47RGYqulir9f3zcxLwP8iaDF7oHwKDQioVlK44gGS67MWD8kwCn2 SAE009aWhihmCRGjlD4vtbV/7TnFg1UskDXVvc5ujkBhEeDBVo1DmA9wUM8JQqtrwMJe +gUX+o+0fNc2RZ/Ez6z8hUvzvYq54zPhUFauS9tD+lxEsFxCgTfmQhf4d8A3S0+UgQYn FWrIsMI3srCBx+xz6Qiw4SduLlorOfy9227G6v0mBhGX5YEQdjizL0aHGl8Hl0Z0x7xm i0vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="uWNNEd/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si12310314eds.85.2021.03.29.03.55.11; Mon, 29 Mar 2021 03:55:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="uWNNEd/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234953AbhC2IpS (ORCPT + 99 others); Mon, 29 Mar 2021 04:45:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:41790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234058AbhC2I1m (ORCPT ); Mon, 29 Mar 2021 04:27:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFEB961959; Mon, 29 Mar 2021 08:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006397; bh=mn59pqmpapYyvMvd3w6aPOstX0re7g6q5OevhBUXP68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uWNNEd/OP0oBULtw2ZSwgF4vZ21uCIEuhTEq8m3brVNDUFnhu+tc0yll5h+WeHZY8 qPrlJL/LLu+2FlD8WGdo5W8ny1eTZHKxpsDAzUfSCKM4uc30dGWvOH8LVarWXsFykr r6rvOCtvFhoieTgaS+B3LjRJgBRz8VfSXqnhLOH4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "David S. Miller" Subject: [PATCH 5.10 219/221] Revert "net: bonding: fix error return code of bond_neigh_init()" Date: Mon, 29 Mar 2021 09:59:10 +0200 Message-Id: <20210329075636.444052945@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@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: X-Mailing-List: linux-kernel@vger.kernel.org From: David S. Miller commit 080bfa1e6d928a5d1f185cc44e5f3c251df06df5 upstream. This reverts commit 2055a99da8a253a357bdfd359b3338ef3375a26c. This change rejects legitimate configurations. A slave doesn't need to exist nor implement ndo_slave_setup. Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/bonding/bond_main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3918,15 +3918,11 @@ static int bond_neigh_init(struct neighb rcu_read_lock(); slave = bond_first_slave_rcu(bond); - if (!slave) { - ret = -EINVAL; + if (!slave) goto out; - } slave_ops = slave->dev->netdev_ops; - if (!slave_ops->ndo_neigh_setup) { - ret = -EINVAL; + if (!slave_ops->ndo_neigh_setup) goto out; - } /* TODO: find another way [1] to implement this. * Passing a zeroed structure is fragile,