Re: packet: Improve exception handling in fanout_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 1 Jan 2024 10:46:45 +0100
Markus Elfring <Markus.Elfring@xxxxxx> wrote:

> > It is fine to call kfree with a possible NULL pointer:  
> …
> > 	 * If @object is NULL, no operation is performed.
> > 	 */
> > 	void kfree(const void *object)  
> 
> Such a function call triggers an input parameter validation
> with a corresponding immediate return, doesn't it?
> Do you find such data processing really helpful for the desired error/exception handling?

If you look at the existing coccinelle script there is even one
to remove unnecessary checks for null before calling kfree.





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux