]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix indirect calls helpers for ptype list hooks.
authorPaolo Abeni <pabeni@redhat.com>
Tue, 4 Jun 2019 09:44:06 +0000 (11:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2019 03:16:22 +0000 (20:16 -0700)
commit3f995fecb37d7e9bd587b4c89059a82ecb2502f5
tree6b4f0a04b4564691e5796e595c5766ba18229778
parent66d86f11ffa9ec4b0853ce9c06bddc826a6de4a0
net: fix indirect calls helpers for ptype list hooks.

As Eric noted, the current wrapper for ptype func hook inside
__netif_receive_skb_list_ptype() has no chance of avoiding the indirect
call: we enter such code path only for protocols other than ipv4 and
ipv6.

Instead we can wrap the list_func invocation.

v1 -> v2:
 - use the correct fix tag

Fixes: a30950030976 ("net: use indirect calls helpers for ptype hook")
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Edward Cree <ecree@solarflare.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c