From: kernel test robot <lkp@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: net/netfilter/nf_conntrack_ovs.c:66:19: sparse: sparse: incorrect type in assignment (different modifiers)
Date: Fri, 17 Jul 2026 18:04:25 +0800 [thread overview]
Message-ID: <202607171742.63buVftr-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fce2dfa773ced15f27dd27cd0b482a7473cdcf2a
commit: ac46f3f35b6e68fb062ae7cf780d516c0cf4c00a netfilter: nf_conntrack_helper: add refcounting from datapath
date: 6 weeks ago
config: x86_64-randconfig-r134-20260717 (https://download.01.org/0day-ci/archive/20260717/202607171742.63buVftr-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260717/202607171742.63buVftr-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: ac46f3f35b6e ("netfilter: nf_conntrack_helper: add refcounting from datapath")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607171742.63buVftr-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> net/netfilter/nf_conntrack_ovs.c:66:19: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected int ( *helper_cb )( ... ) @@ got int ( [noderef] * )( ... ) @@
net/netfilter/nf_conntrack_ovs.c:66:19: sparse: expected int ( *helper_cb )( ... )
net/netfilter/nf_conntrack_ovs.c:66:19: sparse: got int ( [noderef] * )( ... )
vim +66 net/netfilter/nf_conntrack_ovs.c
10
11 /* 'skb' should already be pulled to nh_ofs. */
12 int nf_ct_helper(struct sk_buff *skb, struct nf_conn *ct,
13 enum ip_conntrack_info ctinfo, u16 proto)
14 {
15 int (*helper_cb)(struct sk_buff *skb, unsigned int protoff,
16 struct nf_conn *ct,
17 enum ip_conntrack_info conntrackinfo);
18 const struct nf_conntrack_helper *helper;
19 const struct nf_conn_help *help;
20 unsigned int protoff;
21 int err;
22
23 if (ctinfo == IP_CT_RELATED_REPLY)
24 return NF_ACCEPT;
25
26 help = nfct_help(ct);
27 if (!help)
28 return NF_ACCEPT;
29
30 helper = rcu_dereference(help->helper);
31 if (!helper)
32 return NF_ACCEPT;
33
34 if (helper->tuple.src.l3num != NFPROTO_UNSPEC &&
35 helper->tuple.src.l3num != proto)
36 return NF_ACCEPT;
37
38 switch (proto) {
39 case NFPROTO_IPV4:
40 protoff = ip_hdrlen(skb);
41 proto = ip_hdr(skb)->protocol;
42 break;
43 case NFPROTO_IPV6: {
44 u8 nexthdr = ipv6_hdr(skb)->nexthdr;
45 __be16 frag_off;
46 int ofs;
47
48 ofs = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr,
49 &frag_off);
50 if (ofs < 0 || (frag_off & htons(~0x7)) != 0) {
51 pr_debug("proto header not found\n");
52 return NF_ACCEPT;
53 }
54 protoff = ofs;
55 proto = nexthdr;
56 break;
57 }
58 default:
59 WARN_ONCE(1, "helper invoked on non-IP family!");
60 return NF_DROP;
61 }
62
63 if (helper->tuple.dst.protonum != proto)
64 return NF_ACCEPT;
65
> 66 helper_cb = rcu_dereference(helper->help);
67 if (!helper_cb)
68 return NF_ACCEPT;
69
70 err = helper_cb(skb, protoff, ct, ctinfo);
71 if (err != NF_ACCEPT)
72 return err;
73
74 /* Adjust seqs after helper. This is needed due to some helpers (e.g.,
75 * FTP with NAT) adusting the TCP payload size when mangling IP
76 * addresses and/or port numbers in the text-based control connection.
77 */
78 if (test_bit(IPS_SEQ_ADJUST_BIT, &ct->status) &&
79 !nf_ct_seq_adjust(skb, ct, ctinfo, protoff))
80 return NF_DROP;
81 return NF_ACCEPT;
82 }
83 EXPORT_SYMBOL_GPL(nf_ct_helper);
84
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-07-17 10:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202607171742.63buVftr-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pablo@netfilter.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.