diff mbox series

[net-next,01/12] netfilter: nft_inner: fix IS_ERR() vs NULL check

Message ID 20221211101204.1751-2-pablo@netfilter.org (mailing list archive)
State Accepted
Commit 98cbc40e4f7d15bc21a314a151071566e14ca39c
Delegated to: Netdev Maintainers
Headers show
Series [net-next,01/12] netfilter: nft_inner: fix IS_ERR() vs NULL check | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Pull request is its own cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/cc_maintainers warning 3 maintainers not CCed: fw@strlen.de kadlec@netfilter.org coreteam@netfilter.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 16 this patch: 16
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Pablo Neira Ayuso Dec. 11, 2022, 10:11 a.m. UTC
From: Dan Carpenter <error27@gmail.com>

The __nft_expr_type_get() function returns NULL on error.  It never
returns error pointers.

Fixes: 3a07327d10a0 ("netfilter: nft_inner: support for inner tunnel header matching")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nf_tables_api.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 12, 2022, 11 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by Pablo Neira Ayuso <pablo@netfilter.org>:

On Sun, 11 Dec 2022 11:11:53 +0100 you wrote:
> From: Dan Carpenter <error27@gmail.com>
> 
> The __nft_expr_type_get() function returns NULL on error.  It never
> returns error pointers.
> 
> Fixes: 3a07327d10a0 ("netfilter: nft_inner: support for inner tunnel header matching")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> 
> [...]

Here is the summary with links:
  - [net-next,01/12] netfilter: nft_inner: fix IS_ERR() vs NULL check
    https://git.kernel.org/netdev/net-next/c/98cbc40e4f7d
  - [net-next,02/12] netfilter: conntrack: add sctp DATA_SENT state
    https://git.kernel.org/netdev/net-next/c/bff3d0534804
  - [net-next,03/12] netfilter: conntrack: merge ipv4+ipv6 confirm functions
    https://git.kernel.org/netdev/net-next/c/a70e483460d5
  - [net-next,04/12] netfilter: ipset: Add support for new bitmask parameter
    https://git.kernel.org/netdev/net-next/c/e93745249505
  - [net-next,05/12] netfilter: conntrack: set icmpv6 redirects as RELATED
    https://git.kernel.org/netdev/net-next/c/7d7cfb48d813
  - [net-next,06/12] netfilter: flowtable: add a 'default' case to flowtable datapath
    https://git.kernel.org/netdev/net-next/c/895fa59647cd
  - [net-next,07/12] ipvs: add rcu protection to stats
    https://git.kernel.org/netdev/net-next/c/5df7d714d8cb
  - [net-next,08/12] ipvs: use common functions for stats allocation
    https://git.kernel.org/netdev/net-next/c/de39afb3d811
  - [net-next,09/12] ipvs: use u64_stats_t for the per-cpu counters
    https://git.kernel.org/netdev/net-next/c/1dbd8d9a82e3
  - [net-next,10/12] ipvs: use kthreads for stats estimation
    https://git.kernel.org/netdev/net-next/c/705dd3444081
  - [net-next,11/12] ipvs: add est_cpulist and est_nice sysctl vars
    https://git.kernel.org/netdev/net-next/c/f0be83d54217
  - [net-next,12/12] ipvs: run_estimation should control the kthread tasks
    https://git.kernel.org/netdev/net-next/c/144361c1949f

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 2fa52b8d5ce1..833850a4780f 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -2873,8 +2873,8 @@  int nft_expr_inner_parse(const struct nft_ctx *ctx, const struct nlattr *nla,
 		return -EINVAL;
 
 	type = __nft_expr_type_get(ctx->family, tb[NFTA_EXPR_NAME]);
-	if (IS_ERR(type))
-		return PTR_ERR(type);
+	if (!type)
+		return -ENOENT;
 
 	if (!type->inner_ops)
 		return -EOPNOTSUPP;