lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.15] usb: gadget: u_ether: fix regression in setting fixed MAC address
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

\
 
 \ /
  Last update: 2022-06-23 17:53    [W:0.026 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site