lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 18 Jun 2024 17:21:03 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: David Wei <dw@...idwei.uk>
Cc: edward.cree@....com, linux-net-drivers@....com, davem@...emloft.com,
 edumazet@...gle.com, pabeni@...hat.com, Edward Cree
 <ecree.xilinx@...il.com>, netdev@...r.kernel.org, habetsm.xilinx@...il.com,
 sudheer.mogilappagari@...el.com, jdamato@...tly.com, mw@...ihalf.com,
 linux@...linux.org.uk, sgoutham@...vell.com, gakula@...vell.com,
 sbhatta@...vell.com, hkelam@...vell.com, saeedm@...dia.com,
 leon@...nel.org, jacob.e.keller@...el.com, andrew@...n.ch,
 ahmed.zaki@...el.com
Subject: Re: [PATCH v5 net-next 1/7] net: move ethtool-related netdev state
 into its own struct

On Tue, 18 Jun 2024 16:45:56 -0700 David Wei wrote:
> >> dev->ethtool = NULL?  
> > 
> > defensive programming is sometimes permitted by not encouraged :)  
> 
> I've been here enough to know this bit!
> 
> But, kfree(foo) followed by foo = NULL is a common pattern I see in
> kernel code. free_netdev() does it a bit further down. Is this pattern
> deprecated, then?

I wouldn't say its deprecated. But I'd certainly let the author choose
not to do this, especially on a straightforward path like free_netdev()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ