netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-next: Tree for Sep 27
       [not found] <20160927164026.741b290b@canb.auug.org.au>
@ 2016-09-27 10:03 ` Sergey Senozhatsky
  2016-10-04  0:48   ` Sergey Senozhatsky
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Senozhatsky @ 2016-09-27 10:03 UTC (permalink / raw)
  To: Aaron Conole
  Cc: linux-next, linux-kernel, Stephen Rothwell, Florian Westphal,
	Pablo Neira Ayuso, netdev, netfilter-devel, Sergey Senozhatsky,
	Sergey Senozhatsky

Hello,

On (09/27/16 16:40), Stephen Rothwell wrote:
> 
> Changes since 20160923:
> 

seems that commit e3b37f11e6e4e6b6 ("netfilter: replace list_head with
single linked list") breaks the build on !CONFIG_NETFILTER_INGRESS systems
accessing ->nf_hooks_ingress

static void nf_set_hooks_head(struct net *net, const struct nf_hook_ops *reg,
                             struct nf_hook_entry *entry)
{
       switch (reg->pf) {
       case NFPROTO_NETDEV:
               /* We already checked in nf_register_net_hook() that this is
                * used from ingress.
                */
               rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
					^^^^^^^^^^^^^^^^^^^^


log:


In file included from ./include/linux/linkage.h:4:0,
                 from ./include/linux/kernel.h:6,
                 from net/netfilter/core.c:10:
net/netfilter/core.c: In function ‘nf_set_hooks_head’:
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:322:17: note: in definition of macro ‘WRITE_ONCE’
  union { typeof(x) __val; char __c[1]; } __u = \
                 ^
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:323:30: note: in definition of macro ‘WRITE_ONCE’
   { .__val = (__force typeof(x)) (val) }; \
                              ^
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:323:35: note: in definition of macro ‘WRITE_ONCE’
   { .__val = (__force typeof(x)) (val) }; \
                                   ^~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:324:22: note: in definition of macro ‘WRITE_ONCE’
  __write_once_size(&(x), __u.__c, sizeof(x)); \
                      ^
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:324:42: note: in definition of macro ‘WRITE_ONCE’
  __write_once_size(&(x), __u.__c, sizeof(x)); \
                                          ^
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
In file included from ./include/linux/linkage.h:4:0,
                 from ./include/linux/kernel.h:6,
                 from net/netfilter/core.c:10:
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:498:19: note: in definition of macro ‘__compiletime_assert’
   bool __cond = !(condition);    \
                   ^~~~~~~~~
./include/linux/compiler.h:518:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:521:2: note: in expansion of macro ‘compiletime_assert’
  compiletime_assert(__native_word(t),    \
  ^~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:521:21: note: in expansion of macro ‘__native_word’
  compiletime_assert(__native_word(t),    \
                     ^~~~~~~~~~~~~
./arch/x86/include/asm/barrier.h:64:2: note: in expansion of macro ‘compiletime_assert_atomic_type’
  compiletime_assert_atomic_type(*p);    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:498:19: note: in definition of macro ‘__compiletime_assert’
   bool __cond = !(condition);    \
                   ^~~~~~~~~
./include/linux/compiler.h:518:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:521:2: note: in expansion of macro ‘compiletime_assert’
  compiletime_assert(__native_word(t),    \
  ^~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:521:21: note: in expansion of macro ‘__native_word’
  compiletime_assert(__native_word(t),    \
                     ^~~~~~~~~~~~~
./arch/x86/include/asm/barrier.h:64:2: note: in expansion of macro ‘compiletime_assert_atomic_type’
  compiletime_assert_atomic_type(*p);    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:498:19: note: in definition of macro ‘__compiletime_assert’
   bool __cond = !(condition);    \
                   ^~~~~~~~~
./include/linux/compiler.h:518:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:521:2: note: in expansion of macro ‘compiletime_assert’
  compiletime_assert(__native_word(t),    \
  ^~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:521:21: note: in expansion of macro ‘__native_word’
  compiletime_assert(__native_word(t),    \
                     ^~~~~~~~~~~~~
./arch/x86/include/asm/barrier.h:64:2: note: in expansion of macro ‘compiletime_assert_atomic_type’
  compiletime_assert_atomic_type(*p);    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:498:19: note: in definition of macro ‘__compiletime_assert’
   bool __cond = !(condition);    \
                   ^~~~~~~~~
./include/linux/compiler.h:518:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:521:2: note: in expansion of macro ‘compiletime_assert’
  compiletime_assert(__native_word(t),    \
  ^~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:521:21: note: in expansion of macro ‘__native_word’
  compiletime_assert(__native_word(t),    \
                     ^~~~~~~~~~~~~
./arch/x86/include/asm/barrier.h:64:2: note: in expansion of macro ‘compiletime_assert_atomic_type’
  compiletime_assert_atomic_type(*p);    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
In file included from ./include/linux/linkage.h:4:0,
                 from ./include/linux/kernel.h:6,
                 from net/netfilter/core.c:10:
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:322:17: note: in definition of macro ‘WRITE_ONCE’
  union { typeof(x) __val; char __c[1]; } __u = \
                 ^
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:323:30: note: in definition of macro ‘WRITE_ONCE’
   { .__val = (__force typeof(x)) (val) }; \
                              ^
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:323:35: note: in definition of macro ‘WRITE_ONCE’
   { .__val = (__force typeof(x)) (val) }; \
                                   ^~~
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:25: note: in expansion of macro ‘RCU_INITIALIZER’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
                         ^~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:323:35: note: in definition of macro ‘WRITE_ONCE’
   { .__val = (__force typeof(x)) (val) }; \
                                   ^~~
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:25: note: in expansion of macro ‘RCU_INITIALIZER’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
                         ^~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:324:22: note: in definition of macro ‘WRITE_ONCE’
  __write_once_size(&(x), __u.__c, sizeof(x)); \
                      ^
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:30: error: ‘struct net_device’ has no member named ‘nf_hooks_ingress’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                              ^
./include/linux/compiler.h:324:42: note: in definition of macro ‘WRITE_ONCE’
  __write_once_size(&(x), __u.__c, sizeof(x)); \
                                          ^
./include/asm-generic/barrier.h:157:33: note: in expansion of macro ‘__smp_store_release’
 #define smp_store_release(p, v) __smp_store_release(p, v)
                                 ^~~~~~~~~~~~~~~~~~~
./include/linux/rcupdate.h:668:3: note: in expansion of macro ‘smp_store_release’
   smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
   ^~~~~~~~~~~~~~~~~
net/netfilter/core.c:96:3: note: in expansion of macro ‘rcu_assign_pointer’
   rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
   ^~~~~~~~~~~~~~~~~~
  CC      net/ipv4/ip_fragment.o
make[2]: *** [scripts/Makefile.build:290: net/netfilter/core.o] Error 1
make[1]: *** [scripts/Makefile.build:475: net/netfilter] Error 2
make[1]: *** Waiting for unfinished jobs....

	-ss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: Tree for Sep 27
  2016-09-27 10:03 ` linux-next: Tree for Sep 27 Sergey Senozhatsky
@ 2016-10-04  0:48   ` Sergey Senozhatsky
  2016-10-05 20:56     ` error: 'struct net_device' has no member named 'nf_hooks_ingress' Michal Sojka
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Senozhatsky @ 2016-10-04  0:48 UTC (permalink / raw)
  To: Aaron Conole
  Cc: linux-next, linux-kernel, Stephen Rothwell, Florian Westphal,
	Pablo Neira Ayuso, netdev, netfilter-devel, Sergey Senozhatsky,
	Sergey Senozhatsky

On (09/27/16 19:03), Sergey Senozhatsky wrote:
> Hello,
> 
> On (09/27/16 16:40), Stephen Rothwell wrote:
> > 
> > Changes since 20160923:
> > 
> 
> seems that commit e3b37f11e6e4e6b6 ("netfilter: replace list_head with
> single linked list") breaks the build on !CONFIG_NETFILTER_INGRESS systems
> accessing ->nf_hooks_ingress
> 
> static void nf_set_hooks_head(struct net *net, const struct nf_hook_ops *reg,
>                              struct nf_hook_entry *entry)
> {
>        switch (reg->pf) {
>        case NFPROTO_NETDEV:
>                /* We already checked in nf_register_net_hook() that this is
>                 * used from ingress.
>                 */
>                rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
> 					^^^^^^^^^^^^^^^^^^^^


so I see two commits in linux-next now that fix the commit in question in
two patches

 : commit 7816ec564ec40ae20bb7925f733a181cad0cc491 ("netfilter: accommodate
 : different kconfig in nf_set_hooks_head")
 :
 :    When CONFIG_NETFILTER_INGRESS is unset (or no), we need to handle
 :    the request for registration properly by dropping the hook.  This
 :    releases the entry during the set.
 :
 :    Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list")

and

 : commit 5119e4381a90fabd3442bde02707cbd9e5d7367a ("netfilter: Fix potential
 : null pointer dereference")
 :
 :    It's possible for nf_hook_entry_head to return NULL.  If two
 :    nf_unregister_net_hook calls happen simultaneously with a single hook
 :    entry in the list, both will enter the nf_hook_mutex critical section.
 :    The first will successfully delete the head, but the second will see
 :    this NULL pointer and attempt to dereference.
 :
 :    This fix ensures that no null pointer dereference could occur when such
 :    a condition happens.
 :
 :    Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list")


do you guys plan to fold those into "e3b37f11e6e4" (a preferred way)
or will send it out as 3 separate patches (um, why) ?

	-ss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* error: 'struct net_device' has no member named 'nf_hooks_ingress'
  2016-10-04  0:48   ` Sergey Senozhatsky
@ 2016-10-05 20:56     ` Michal Sojka
  2016-10-05 21:11       ` Eric Dumazet
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Sojka @ 2016-10-05 20:56 UTC (permalink / raw)
  To: Sergey Senozhatsky, Aaron Conole
  Cc: linux-next, linux-kernel, Stephen Rothwell, Florian Westphal,
	Pablo Neira Ayuso, netdev, netfilter-devel, Sergey Senozhatsky,
	Sergey Senozhatsky

Hi,

On Tue, Oct 04 2016, Sergey Senozhatsky wrote:
> On (09/27/16 19:03), Sergey Senozhatsky wrote:
>> Hello,
>> 
>> On (09/27/16 16:40), Stephen Rothwell wrote:
>> > 
>> > Changes since 20160923:
>> > 
>> 
>> seems that commit e3b37f11e6e4e6b6 ("netfilter: replace list_head with
>> single linked list") breaks the build on !CONFIG_NETFILTER_INGRESS systems
>> accessing ->nf_hooks_ingress

this commit is now in mainline as
e3b37f11e6e4e6b6f02cc762f182ce233d2c1c9d and it breaks my build:

    net/netfilter/core.c: In function 'nf_set_hooks_head':
    net/netfilter/core.c:96:3: error: 'struct net_device' has no member named 'nf_hooks_ingress'

Are the fixes (see below) on the way to mainline too?

Thanks.
-Michal



>> 
>> static void nf_set_hooks_head(struct net *net, const struct nf_hook_ops *reg,
>>                              struct nf_hook_entry *entry)
>> {
>>        switch (reg->pf) {
>>        case NFPROTO_NETDEV:
>>                /* We already checked in nf_register_net_hook() that this is
>>                 * used from ingress.
>>                 */
>>                rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
>> 					^^^^^^^^^^^^^^^^^^^^
>
>
> so I see two commits in linux-next now that fix the commit in question in
> two patches
>
>  : commit 7816ec564ec40ae20bb7925f733a181cad0cc491 ("netfilter: accommodate
>  : different kconfig in nf_set_hooks_head")
>  :
>  :    When CONFIG_NETFILTER_INGRESS is unset (or no), we need to handle
>  :    the request for registration properly by dropping the hook.  This
>  :    releases the entry during the set.
>  :
>  :    Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list")
>
> and
>
>  : commit 5119e4381a90fabd3442bde02707cbd9e5d7367a ("netfilter: Fix potential
>  : null pointer dereference")
>  :
>  :    It's possible for nf_hook_entry_head to return NULL.  If two
>  :    nf_unregister_net_hook calls happen simultaneously with a single hook
>  :    entry in the list, both will enter the nf_hook_mutex critical section.
>  :    The first will successfully delete the head, but the second will see
>  :    this NULL pointer and attempt to dereference.
>  :
>  :    This fix ensures that no null pointer dereference could occur when such
>  :    a condition happens.
>  :
>  :    Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list")
>
>
> do you guys plan to fold those into "e3b37f11e6e4" (a preferred way)
> or will send it out as 3 separate patches (um, why) ?
>
> 	-ss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: error: 'struct net_device' has no member named 'nf_hooks_ingress'
  2016-10-05 20:56     ` error: 'struct net_device' has no member named 'nf_hooks_ingress' Michal Sojka
@ 2016-10-05 21:11       ` Eric Dumazet
  2016-10-06  4:31         ` Sergey Senozhatsky
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2016-10-05 21:11 UTC (permalink / raw)
  To: Michal Sojka
  Cc: Sergey Senozhatsky, Aaron Conole, linux-next, linux-kernel,
	Stephen Rothwell, Florian Westphal, Pablo Neira Ayuso, netdev,
	netfilter-devel, Sergey Senozhatsky

On Wed, 2016-10-05 at 22:56 +0200, Michal Sojka wrote:

> this commit is now in mainline as
> e3b37f11e6e4e6b6f02cc762f182ce233d2c1c9d and it breaks my build:
> 
>     net/netfilter/core.c: In function 'nf_set_hooks_head':
>     net/netfilter/core.c:96:3: error: 'struct net_device' has no member named 'nf_hooks_ingress'
> 
> Are the fixes (see below) on the way to mainline too?

Yes the fixes are already in nf tree and _will_ get pushed.

Pablo and David are attending netdev 1.2 in Tokyo and have obligations.

https://git.kernel.org/cgit/linux/kernel/git/pablo/nf-next.git/

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: error: 'struct net_device' has no member named 'nf_hooks_ingress'
  2016-10-05 21:11       ` Eric Dumazet
@ 2016-10-06  4:31         ` Sergey Senozhatsky
  0 siblings, 0 replies; 5+ messages in thread
From: Sergey Senozhatsky @ 2016-10-06  4:31 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Michal Sojka, Sergey Senozhatsky, Aaron Conole, linux-next,
	linux-kernel, Stephen Rothwell, Florian Westphal,
	Pablo Neira Ayuso, netdev, netfilter-devel, Sergey Senozhatsky

On (10/06/16 06:11), Eric Dumazet wrote:
> On Wed, 2016-10-05 at 22:56 +0200, Michal Sojka wrote:
> 
> > this commit is now in mainline as
> > e3b37f11e6e4e6b6f02cc762f182ce233d2c1c9d and it breaks my build:
> > 
> >     net/netfilter/core.c: In function 'nf_set_hooks_head':
> >     net/netfilter/core.c:96:3: error: 'struct net_device' has no member named 'nf_hooks_ingress'
> > 
> > Are the fixes (see below) on the way to mainline too?
> 
> Yes the fixes are already in nf tree and _will_ get pushed.
> 
> Pablo and David are attending netdev 1.2 in Tokyo and have obligations.
> 
> https://git.kernel.org/cgit/linux/kernel/git/pablo/nf-next.git/

well, I did my best to avoid it, but the guys didn't even bother to
reply. pushing a knowingly broken patch that
	a) kills the build
	b) introduces a race
	c) requires two "Fixes:" followup patches
to the main line despite the fact that those problems were discovered
at linux-next stage is totally un-cool.

	-ss

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-06  4:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20160927164026.741b290b@canb.auug.org.au>
2016-09-27 10:03 ` linux-next: Tree for Sep 27 Sergey Senozhatsky
2016-10-04  0:48   ` Sergey Senozhatsky
2016-10-05 20:56     ` error: 'struct net_device' has no member named 'nf_hooks_ingress' Michal Sojka
2016-10-05 21:11       ` Eric Dumazet
2016-10-06  4:31         ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).