From: Steffen Klassert <steffen.klassert@secunet.com>
To: Yang Ruibin <11162571@vivo.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<opensource.kernel@vivo.com>
Subject: Re: [PATCH v1] net:xfrm:use IS_ERR() with __xfrm_policy_eval_candidates()
Date: Wed, 21 Aug 2024 14:11:50 +0200 [thread overview]
Message-ID: <ZsXZhmSZ1ioCtgoY@gauss3.secunet.de> (raw)
In-Reply-To: <20240821113808.6744-1-11162571@vivo.com>
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@vivo.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
prev parent reply other threads:[~2024-08-21 12:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 11:38 Yang Ruibin
2024-08-21 12:11 ` Steffen Klassert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZsXZhmSZ1ioCtgoY@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=11162571@vivo.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®