Re: [Intel-wired-lan] [PATCH net] igc: Fix passing 0 to ERR_PTR in igc_xdp_run_prog()

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

 




On 10/17/2024 7:16 AM, Simon Horman wrote:
> On Wed, Oct 16, 2024 at 04:06:34PM -0700, Jacob Keller wrote:
>>
>> Not quite. PTR_ERR_OR_ZERO is intended for the case where you are
>> extracting an error from a pointer. This is converting an error into a
>> pointer.
> 
> Yes, silly me.
> 
>> I am not sure what is really expected here. If res is zero, shouldn't we
>> be returning an skb pointer and not NULL?
> 
> Right. I think the whole point of the cited warning is that it highlights
> code that is often buggy. I think I may have tried to address it in the
> past, but if so unsuccessfully. In any case, I do think it would be good to
> dig into this and either fix it properly (or understand why it is correct
> and note that somewhere.
> 

Right. I think we identified the correct fix. This same code was in i40e
and was removed in a better way.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux