[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201011105934.5c988cd3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Sun, 11 Oct 2020 10:59:34 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Anant Thazhemadam <anant.thazhemadam@...il.com>
Cc: petkan@...leusys.com, davem@...emloft.net,
linux-usb@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
linux-next@...r.kernel.org, sfr@...b.auug.org.au
Subject: Re: [PATCH v2] net: usb: rtl8150: don't incorrectly assign random
MAC addresses
On Sun, 11 Oct 2020 23:00:30 +0530 Anant Thazhemadam wrote:
> In set_ethernet_addr(), if get_registers() succeeds, the ethernet address
> that was read must be copied over. Otherwise, a random ethernet address
> must be assigned.
>
> get_registers() returns 0 if successful, and negative error number
> otherwise. However, in set_ethernet_addr(), this return value is
> incorrectly checked.
>
> Since this return value will never be equal to sizeof(node_id), a
> random MAC address will always be generated and assigned to the
> device; even in cases when get_registers() is successful.
>
> Correctly modifying the condition that checks if get_registers() was
> successful or not fixes this problem, and copies the ethernet address
> appropriately.
>
> Fixes: f45a4248ea4c ("net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails")
> Signed-off-by: Anant Thazhemadam <anant.thazhemadam@...il.com>
This patch is a fix to a conflict resolution in linux-next.
linux-next is not a "real" tree, it's an integration tree used to
figure out conflicts early.
We had let Stephen know about the problem already. Please wait one
week, and if the problem is still present resend this.
Thank you.
Powered by blists - more mailing lists