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
| ||
|
Message-Id: <20230807020525.248349-1-xu.xin16@zte.com.cn> Date: Mon, 7 Aug 2023 02:05:25 +0000 From: xu <xu.xin.sc@...il.com> To: vadim.fedorenko@...ux.dev Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com, kuba@...nel.org, linux-kernel@...r.kernel.org, netdev@...r.kernel.org, yang.yang29@....com.cn, xu.xin16@....com.cn, si.hao@....com.cn, dai.shixin@....com.cn Subject: Re: [PATCH] net/ipv4: return the real errno instead of -EINVAL >> @@ -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/
Powered by blists - more mailing lists