[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 10 Oct 2020 09:59:31 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Anant Thazhemadam <anant.thazhemadam@...il.com>
Cc: linux-kernel-mentees@...ts.linuxfoundation.org,
Petko Manolov <petkan@...leusys.com>,
"David S. Miller" <davem@...emloft.net>, linux-usb@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC
addresses
On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote:
> get_registers() directly returns the return value of
> usb_control_msg_recv() - 0 if successful, and negative error number
> otherwise.
Are you expecting Greg to take this as a part of some USB subsystem
changes? I don't see usb_control_msg_recv() in my tree, and the
semantics of usb_control_msg() are not what you described.
> 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 ("set random MAC address when set_ethernet_addr() fails")
> Signed-off-by: Anant Thazhemadam <anant.thazhemadam@...il.com>
The fixes tag does not follow the standard format:
Fixes tag: Fixes: f45a4248ea4c ("set random MAC address when set_ethernet_addr() fails")
Has these problem(s):
- Subject does not match target commit subject
Just use
git log -1 --format='Fixes: %h ("%s")'
Please put the relevant maintainer in the To: field of the email, and
even better - also mark the patch as [PATCH net], since it's a
networking fix.
Powered by blists - more mailing lists