Re: [PATCH net v4 1/2] net: Add non-RCU dev_getbyhwaddr() helper
From: Kuniyuki Iwashima
Date: Fri Feb 14 2025 - 00:50:06 EST
From: Breno Leitao <leitao@xxxxxxxxxx>
Date: Thu, 13 Feb 2025 04:42:37 -0800
> Add dedicated helper for finding devices by hardware address when
> holding rtnl_lock, similar to existing dev_getbyhwaddr_rcu(). This prevents
> PROVE_LOCKING warnings when rtnl_lock is held but RCU read lock is not.
>
> Extract common address comparison logic into dev_comp_addr().
>
> The context about this change could be found in the following
> discussion:
>
> Link: https://lore.kernel.org/all/20250206-scarlet-ermine-of-improvement-1fcac5@leitao/
>
> Cc: kuniyu@xxxxxxxxxx
> Cc: ushankar@xxxxxxxxxxxxxxx
> Suggested-by: Eric Dumazet <edumazet@xxxxxxxxxx>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
Thanks!