archive mirror
 help / color / mirror / Atom feed
From: Anant Thazhemadam <>
To: Jakub Kicinski <>
Cc: Petko Manolov <>,,,,,
	"David S. Miller" <>
Subject: Re: [Linux-kernel-mentees] [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses
Date: Sat, 10 Oct 2020 23:34:51 +0530	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>


On 10/10/20 10:29 pm, Jakub Kicinski wrote:
> 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.

No, I'm not. usb_control_msg_recv() is an API that was recently
introduced, and get_registers() in rtl8150.c was also modified to
use it in order to prevent partial reads.

By your tree, I assume you mean
(it was the only one I could find).

I don't see the commit that this patch is supposed to fix in your
tree either... :/

Nonetheless, this commit fixes an issue that was applied to the
networking tree, and has made its way into linux-next as well, if
I'm not mistaken.

>> 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 <>
> 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.

The script I've been using for sending patches in had been configured to CC
the maintainer(s) and respective mailing list(s). Sorry about that.

I will put the relevant maintainer in the To: field, fix the Fixes tag, and
mark the patch as [PATCH net] as well and send in a v2.

Thank you for your time.

Linux-kernel-mentees mailing list

  reply	other threads:[~2020-10-10 18:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-10  6:44 [Linux-kernel-mentees] [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses Anant Thazhemadam
2020-10-10 16:59 ` Jakub Kicinski
2020-10-10 18:04   ` Anant Thazhemadam [this message]
2020-10-10 18:16     ` Jakub Kicinski
2020-10-10 18:44       ` Anant Thazhemadam
2020-10-10 19:20         ` Jakub Kicinski
2020-10-11 17:30 ` [Linux-kernel-mentees] [PATCH v2] " Anant Thazhemadam
2020-10-11 17:59   ` Jakub Kicinski
2020-10-11 18:33     ` Joe Perches
2020-10-11 19:31       ` Petko Manolov
2020-10-11 20:14         ` Joe Perches
2020-10-11 22:14   ` Stephen Rothwell
2020-10-15 21:59     ` Stephen Rothwell
2020-10-15 22:24       ` Jakub Kicinski
2020-10-15 22:37         ` Jakub Kicinski
2020-10-18 19:54           ` Jakub Kicinski

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).