Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3323352pxf; Mon, 15 Mar 2021 07:08:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPslpzrCJJpoAoOL/6HUPuWJAuaU6Ky6EFMELvFZl6e204GyFWzf1rJpnoYRWDVILoOebI X-Received: by 2002:a17:906:86c6:: with SMTP id j6mr23022185ejy.197.1615817305891; Mon, 15 Mar 2021 07:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817305; cv=none; d=google.com; s=arc-20160816; b=mZskunp9iKH8qN8hiIVJ/PTSpNam8icdn9TjYKKEJDql7Fzb07llbsO+l7gPL4P+DE +hIs584eFZF5vsA6KbaYF4Ird7GpsSfoezgGX5Gzp7VCeiA5SEgQ0p0s7B9ApUBanTSM VrUKv8CzPMN8ycwFEyQ5suW8WEzMR95A2FFgWhcQZRdLLnWSDSlKqNSP2461h06FMpvF lJKLXyooYcqACpZm9uC9hf4b58tksK/dQjgE/26wCG181m+8Qt5+aLqas57JmL1zvrao 1djW6j0nt27QlCiO0Mhgg0vsiPUbJUIdwk24qz7QIdWSbGzpb3XMIRuqo0wUAwddOi78 ifGg== 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=UxtVzAbvfTF1QmTNOkYDTqu7PH5soWZ7BXnlQUOyqLo=; b=aIPZn+5wcijA954r0Z51w6VJ4vCDXh3wcS9FYJhBXJmWw6u/GUDvU7DryyeFsCrejo A9rlGjx7WOhEc00KoRjHl8sSfw2+x+lvbVswSXL5bza6L7/xZnKAQfWlcLua+hI+mPDI rtfTQ/wGxffJtUbn7on5SWC4bEExN8P8vltymlF1wvJseEWOqPLtocJYZQCK1SHRQBvA MiTrREt6lwWIGHtQpkyK37IkUYlp3ffQNKUsPqNThV5MtKw4SoYwMBmXDHZzcLEU0vGq I7UP1X4ZX/dyPaDro28kdfFErhnE3tnwVOFH3vKonjhyUiYavWYnpRwfQqn3gQdONU7J cS0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A054Ia0N; 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 w15si11864978ejb.202.2021.03.15.07.08.02; Mon, 15 Mar 2021 07:08:25 -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=A054Ia0N; 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 S234744AbhCOOFK (ORCPT + 99 others); Mon, 15 Mar 2021 10:05:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:34888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231951AbhCON5V (ORCPT ); Mon, 15 Mar 2021 09:57:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9625664F0D; Mon, 15 Mar 2021 13:57:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816640; bh=yFrUd4M8Ct0ssDMz1aodWSzI9Tlsi1PvYBtepJWLp7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A054Ia0NtV+7y+t3mJTStKwp0JfkAoj+sXTtRuUv1T0udMEwjIOzYO19Y0WwHhaTw H/8vuXN3DG4LSxynswHChCWv/dBaumb3NuJgjYPKABKxVlRIPpSXI1CAbJ81qY+5e6 j2UuMhlDrmNDpqe3I05hE0II+PXoszAIRoU+FCAo= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiri Wiesner , "David S. Miller" Subject: [PATCH 5.10 028/290] ibmvnic: always store valid MAC address Date: Mon, 15 Mar 2021 14:52:01 +0100 Message-Id: <20210315135542.877598524@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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: Greg Kroah-Hartman From: Jiri Wiesner commit 67eb211487f0c993d9f402d1c196ef159fd6a3b5 upstream. The last change to ibmvnic_set_mac(), 8fc3672a8ad3, meant to prevent users from setting an invalid MAC address on an ibmvnic interface that has not been brought up yet. The change also prevented the requested MAC address from being stored by the adapter object for an ibmvnic interface when the state of the ibmvnic interface is VNIC_PROBED - that is after probing has finished but before the ibmvnic interface is brought up. The MAC address stored by the adapter object is used and sent to the hypervisor for checking when an ibmvnic interface is brought up. The ibmvnic driver ignoring the requested MAC address when in VNIC_PROBED state caused LACP bonds (bonds in 802.3ad mode) with more than one slave to malfunction. The bonding code must be able to change the MAC address of its slaves before they are brought up during enslaving. The inability of kernels with 8fc3672a8ad3 to set the MAC addresses of bonding slaves is observable in the output of "ip address show". The MAC addresses of the slaves are the same as the MAC address of the bond on a working system whereas the slaves retain their original MAC addresses on a system with a malfunctioning LACP bond. Fixes: 8fc3672a8ad3 ("ibmvnic: fix ibmvnic_set_mac") Signed-off-by: Jiri Wiesner Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ibm/ibmvnic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1832,10 +1832,9 @@ static int ibmvnic_set_mac(struct net_de if (!is_valid_ether_addr(addr->sa_data)) return -EADDRNOTAVAIL; - if (adapter->state != VNIC_PROBED) { - ether_addr_copy(adapter->mac_addr, addr->sa_data); + ether_addr_copy(adapter->mac_addr, addr->sa_data); + if (adapter->state != VNIC_PROBED) rc = __ibmvnic_set_mac(netdev, addr->sa_data); - } return rc; }