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] [day] [month] [year] [list]
Message-ID: <ZsXZhmSZ1ioCtgoY@gauss3.secunet.de>
Date: Wed, 21 Aug 2024 14:11:50 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Yang Ruibin <11162571@...o.com>
CC: Herbert Xu <herbert@...dor.apana.org.au>, "David S. Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <opensource.kernel@...o.com>
Subject: Re: [PATCH v1] net:xfrm:use IS_ERR() with
 __xfrm_policy_eval_candidates()

On Wed, Aug 21, 2024 at 07:38:06AM -0400, Yang Ruibin wrote:
> __xfrm_policy_eval_candidates() function maybe returns
> error pointers,So use IS_ERR() to check it.
> 
> Signed-off-by: Yang Ruibin <11162571@...o.com>
> ---
>  net/xfrm/xfrm_policy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
> index c56c61b0c12e..2e412a48b981 100644
> --- a/net/xfrm/xfrm_policy.c
> +++ b/net/xfrm/xfrm_policy.c
> @@ -2156,7 +2156,7 @@ xfrm_policy_eval_candidates(struct xfrm_pol_inexact_candidates *cand,
>  		tmp = __xfrm_policy_eval_candidates(cand->res[i],
>  						    prefer,
>  						    fl, type, family, if_id);
> -		if (!tmp)
> +		if (IS_ERR(tmp))
>  			continue;

This looks wrong. The error case is already handled below.

>  		if (IS_ERR(tmp))
> -- 
> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ