From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Marian Postevca <posteuca@mutex.one>
Cc: Felipe Balbi <balbi@kernel.org>,
Maximilian Senftleben <kernel@mail.msdigital.de>,
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
Date: Thu, 23 Jun 2022 17:52:59 +0200 [thread overview]
Message-ID: <YrSMW6A6Ej8EHxq2@kroah.com> (raw)
In-Reply-To: <20220622201805.4315-1-posteuca@mutex.one>
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 <kernel@mail.msdigital.de>
> 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 <posteuca@mutex.one>
> ---
> drivers/usb/gadget/function/u_ether.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
All now queued up, thanks.
greg k-h
prev parent reply other threads:[~2022-06-23 15:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 20:18 [PATCH 5.15] usb: gadget: u_ether: fix regression in setting fixed MAC address Marian Postevca
2022-06-23 15:52 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YrSMW6A6Ej8EHxq2@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=balbi@kernel.org \
--cc=kernel@mail.msdigital.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=posteuca@mutex.one \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox