summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-09-24 14:10:04 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-09-28 14:47:40 +0200
commit421c119f558761556afca6a62ad183bc2d8659e0 (patch)
treec18d4d3e8b6eae2c8ee7a78af297c163742d22f6 /.gitignore
parenta13f814a67b12a2f29d1decf4b4f4e700658a517 (diff)
netfilter: avoid erronous array bounds warning
Unfortunately some versions of gcc emit following warning: $ make net/xfrm/xfrm_output.o linux/compiler.h:252:20: warning: array subscript is above array bounds [-Warray-bounds] hook_head = rcu_dereference(net->nf.hooks_arp[hook]); ^~~~~~~~~~~~~~~~~~~~~ xfrm_output_resume passes skb_dst(skb)->ops->family as its 'pf' arg so compiler can't know that we'll never access hooks_arp[]. (NFPROTO_IPV4 or NFPROTO_IPV6 are only possible cases). Avoid this by adding an explicit WARN_ON_ONCE() check. This patch has no effect if the family is a compile-time constant as gcc will remove the switch() construct entirely. Reported-by: David Ahern <dsahern@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions