lkml.org 
[lkml]   [2024]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v5 02/10] net: free_netdev: exit earlier if dummy
On Wed, Apr 10, 2024 at 06:13:43AM -0700, Breno Leitao wrote:
> For dummy devices, exit earlier at free_netdev() instead of executing
> the whole function. This is necessary, because dummy devices are
> special, and shouldn't have the second part of the function executed.
>
> Otherwise reg_state, which is NETREG_DUMMY, will be overwritten and
> there will be no way to identify that this is a dummy device. Also, this
> device do not need the final put_device(), since dummy devices are not
> registered (through register_netdevice()), where the device reference is
> increased (at netdev_register_kobject()/device_add()).
>
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

\
 
 \ /
  Last update: 2024-05-27 16:33    [W:2.199 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site