Re: [PATCH ipsec] net: xfrm: pass constant family to nf_hook function

2018-09-21 Thread Florian Westphal
David Ahern wrote: > On 9/21/18 8:55 AM, Florian Westphal wrote: > > David Ahern wrote: > >>> David, i hope this will silence the warning, would be nice > >>> if you could test it. > >> > >> I still the warning. > > > > Wait. Do you see this warning everywhere or just in xfrm? > > > > just

Re: [PATCH ipsec] net: xfrm: pass constant family to nf_hook function

2018-09-21 Thread David Ahern
On 9/21/18 8:55 AM, Florian Westphal wrote: > David Ahern wrote: >>> David, i hope this will silence the warning, would be nice >>> if you could test it. >> >> I still the warning. > > Wait. Do you see this warning everywhere or just in xfrm? > just the one file.

Re: [PATCH ipsec] net: xfrm: pass constant family to nf_hook function

2018-09-21 Thread Florian Westphal
David Ahern wrote: > > David, i hope this will silence the warning, would be nice > > if you could test it. > > I still the warning. Wait. Do you see this warning everywhere or just in xfrm?

Re: [PATCH ipsec] net: xfrm: pass constant family to nf_hook function

2018-09-21 Thread David Ahern
On 9/21/18 3:35 AM, Florian Westphal wrote: > Unfortunately some versions of gcc emit following warning: > linux/compiler.h:252:20: warning: array subscript is above array bounds > [-Warray-bounds] > hook_head = rcu_dereference(net->nf.hooks_arp[hook]); > ^~~~

[PATCH ipsec] net: xfrm: pass constant family to nf_hook function

2018-09-21 Thread Florian Westphal
Unfortunately some versions of gcc emit following warning: 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 non-const 'pf'