Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3322417pxf; Mon, 15 Mar 2021 07:07:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx80InWvqJ1a22YDMCxOqWvsH+xgkqlZEmXfygWodJu1z9VhAHHCyCit9tQcfEh/Yn4svKV X-Received: by 2002:a17:906:a106:: with SMTP id t6mr24072037ejy.63.1615817246583; Mon, 15 Mar 2021 07:07:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817246; cv=none; d=google.com; s=arc-20160816; b=sz3BNbQHiM4c0FH8l42ud1m5fhifvP85saCjfAkr1xX5gYbSQsMbleRClnNMWELyTf 52WoJpwwzybY6CCl/wId9sLzaCIPFOMuz5Y+Py1Na734z+tjGgtRb2LHNSrh6WrFAtko gE8naDP+KPAjMlf+3YVODfDvloTx7Jg1Z5poBw8qgAyU+Irbr+5YB6Wvt7px2/NeksZL qE+ebFIMenKrgda2fGIqnnkLtNub3g6bgCSTTy6fQjCek7V4GNc4VaoV9A3eQIdrjsGx UGHVUVbEB/pGiF2gwSTjfUCxtkGjtvwqd0w0LyA+Q8J8sMQZk01CfTWbLE1AQXpCgIy7 3CJQ== 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=ZdI6RY5oK79katcjnegUCdMQ8zMLknEkGQmR/gUCu58=; b=zHwO0PPh+vRlPBieeHWeQjgxy9pkgJU4kfY3k+Ghy3A17fmJsSiWAs+zeX2YnvJ/zP 8X8/ks/Ho66SN9dXN/EYLZYLp+uHFzpHj5irQq+VpL7e9pERI7OW7ZZag1pRiFcrENqZ m4FGdx+Kgj6RFVb99423PcT9yirBQxWE4mJge7rR4vNNeEjGBNumW+gaI1MWZohwvZyq yKgGflIprB3mQqNuOZi3YbOgufC2NTDA2RYEFRvaNXRTcmAOicvsMkeKCbjLNXRpuDia ey4QT9Ge01DkZ1cqjtEYDSXHHXVWlbk0E/CnreFrMxkb1BR9nbXY8CeR3g0DMt1Xwxi1 xIRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iCcnVXe+; 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 ml22si11116124ejb.629.2021.03.15.07.07.03; Mon, 15 Mar 2021 07:07:26 -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=iCcnVXe+; 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 S234811AbhCOOFm (ORCPT + 99 others); Mon, 15 Mar 2021 10:05:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:34900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231450AbhCON5b (ORCPT ); Mon, 15 Mar 2021 09:57:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D251964F19; 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=ORxlB67NflfF1DCYHbr3rsYeUa7+4osg/vvYopBHtiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iCcnVXe+Tj8p9P91nzTTZJiSK+b4+KGji/5wyxKroRyt/JUTqRjKUe6+zpT89k6as Klwa2oZX4D+RdpcOnKENxGp4dgFFMOcJKEPv6w6nfuPa4MrDP2GZrWMfoDCa+2JAob hxyJDTgJxvtcvDCbC1OW6qCSfGet6vncMjE4nd+4= 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.4 020/168] ibmvnic: always store valid MAC address Date: Mon, 15 Mar 2021 14:54:12 +0100 Message-Id: <20210315135551.015322124@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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 @@ -1753,10 +1753,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; }