Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5978494iog; Thu, 23 Jun 2022 08:56:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sCgR7m8ZqK7qNKN8cHAbQ7hawB5xch5DgflkiClyQtKk19IvwfXkEPYMZCbacFcPYGp+nu X-Received: by 2002:a05:6402:2553:b0:431:6e08:56de with SMTP id l19-20020a056402255300b004316e0856demr11616172edb.406.1655999779450; Thu, 23 Jun 2022 08:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655999779; cv=none; d=google.com; s=arc-20160816; b=GINLkXDSPkYtlesgv0Mx/ILrmmyY6WFCtc0GY2sEJqyg9TEGMamHLpqJTMiiNu9g+4 ScUlA2xuT5uJz/1XjA/bhaJt2zuvqzi475oCMzmO/XXQQMxV51c9zYC5PEYg985+nZBt SHNYIsgq1kYtoFBbPFr71+ZA2cdRXY/7nC5Rjq+uwoP0aMgaSt9SHZ1bIuszenyQk+yJ FTUgnEdRdfDLVH6ilnqnJYfjVDEFoekM8vrevjAkz72zanMIya5DwQ+GaO+Sae7PHQr3 s8EfsQZWpy+4fLHvG0axq9kkZVeOGBrswZFWHDtyZZy1lIPIwxGID/Atbg6DT0QBTj5P bXCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gj1ZAyvD7zi9aXcOv/FnNzFyhXmdwZR7Yx+L6Hwgh8s=; b=DojqL0LqSZKwocozgpNczuhW6a/CHYvUjXUbHiyWZMOvcltPYvSkKh4n5NU8JlcZP8 qJ2rj912N0t/2akhHpPkm7nFX122yjidGU1wqBNBHMXKRYRL8+OMfsB83zwAkhFJriRO 7E9QLJS+YBGsDL+K5Bc3HxjbLJAj3A+sUk2TyzvxohClrOyy9PizsniqjIxESwm4hOz2 vCbIk8iXk6giwpM4Np8s4mIykEhlq5fRp6Vs+sa+mYjjzPRrVRznYK8o2O1SKg/wpdZk EEcuZIb7S/IppydT6K5xVj1LNrE1Dvf+QooegxcffPpYoLmHErob580s5BN3axGrd/hO c6Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SbubtzDL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm12-20020a0564020c8c00b0043575b3fc4csi14715232edb.387.2022.06.23.08.55.54; Thu, 23 Jun 2022 08:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SbubtzDL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231824AbiFWPxH (ORCPT + 99 others); Thu, 23 Jun 2022 11:53:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231825AbiFWPxF (ORCPT ); Thu, 23 Jun 2022 11:53:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85E5920BC4; Thu, 23 Jun 2022 08:53:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 27FA5B8245A; Thu, 23 Jun 2022 15:53:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BB61C3411B; Thu, 23 Jun 2022 15:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655999581; bh=e9iS9st1mjPHEkaMJhYHl7sOW2PmxFr0Kcqm4Or7Q7s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SbubtzDL+WgojpHFsKrNHVMbjyZZXbAFsOrlw3ONLcwaqjckf2uYEMSiy0FQtnGo1 mpRWN+/UUSQpltvf0NFAZumJxTFry7FiAbq7YsCq+CYIqEuX9GAyykAer433H1VKLK 1HEeijKXENW+mVj+TlBDfIKK8OojyfAZ98mFqMrU= Date: Thu, 23 Jun 2022 17:52:59 +0200 From: Greg Kroah-Hartman To: Marian Postevca Cc: Felipe Balbi , Maximilian Senftleben , stable@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5.15] usb: gadget: u_ether: fix regression in setting fixed MAC address Message-ID: References: <20220622201805.4315-1-posteuca@mutex.one> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220622201805.4315-1-posteuca@mutex.one> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 22, 2022 at 11:18:04PM +0300, Marian Postevca wrote: > commit b337af3a4d6147000b7ca6b3438bf5c820849b37 upstream. > > In systemd systems setting a fixed MAC address through > the "dev_addr" module argument fails systematically. > When checking the MAC address after the interface is created > it always has the same but different MAC address to the one > supplied as argument. > > This is partially caused by systemd which by default will > set an internally generated permanent MAC address for interfaces > that are marked as having a randomly generated address. > > Commit 890d5b40908bfd1a ("usb: gadget: u_ether: fix race in > setting MAC address in setup phase") didn't take into account > the fact that the interface must be marked as having a set > MAC address when it's set as module argument. > > Fixed by marking the interface with NET_ADDR_SET when > the "dev_addr" module argument is supplied. > > Reported-by: Maximilian Senftleben > Cc: stable@vger.kernel.org > Fixes: 890d5b40908bfd1a ("usb: gadget: u_ether: fix race in setting MAC address in setup phase") > Signed-off-by: Marian Postevca > --- > drivers/usb/gadget/function/u_ether.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) All now queued up, thanks. greg k-h