lkml.org 
[lkml]   [2023]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] net/ipv4: return the real errno instead of -EINVAL
Date
>> @@ -236,7 +234,8 @@ static int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *s
>> net_dbg_ratelimited("%s: No header cache and no neighbour!\n",
>> __func__);
>> kfree_skb_reason(skb, SKB_DROP_REASON_NEIGH_CREATEFAIL);
>> - return -EINVAL;
>> + res = PTR_ERR(neigh);
>> + return res;
>
>I believe this part could be written as
>
>- return -EINVAL;
>+ return PTR_ERR(neigh);
>
>
>and there is no need to change the code is other places. This will be
>easier to track/backport.

Sure, I initially wrote the same thing with you, but considering the convenience of maintainer review,
I deliberately modified some other parts of the code to present a clear context of the core
modifications.

From your reply, I can see you agree with my key idea of this patch, so I have sent a v2 patch[1] according
to your view.

[1] https://lore.kernel.org/all/20230807015408.248237-1-xu.xin16@zte.com.cn/

\
 
 \ /
  Last update: 2023-08-07 04:06    [W:0.199 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site