* [PATCH net] net: fix indirect calls helpers for ptype list hooks.
@ 2019-06-03 10:46 Paolo Abeni
2019-06-03 14:03 ` Edward Cree
2019-06-03 17:29 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Abeni @ 2019-06-03 10:46 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Edward Cree, Eric Dumazet
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.
Fixes: 92884ca8830b ("net: fix indirect calls helpers for ptype list hooks.")
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/core/dev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 66f7508825bd..1c4593ec4409 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5025,12 +5025,12 @@ static inline void __netif_receive_skb_list_ptype(struct list_head *head,
if (list_empty(head))
return;
if (pt_prev->list_func != NULL)
- pt_prev->list_func(head, pt_prev, orig_dev);
+ INDIRECT_CALL_INET(pt_prev->list_func, ipv6_list_rcv,
+ ip_list_rcv, head, pt_prev, orig_dev);
else
list_for_each_entry_safe(skb, next, head, list) {
skb_list_del_init(skb);
- INDIRECT_CALL_INET(pt_prev->func, ipv6_rcv, ip_rcv, skb,
- skb->dev, pt_prev, orig_dev);
+ pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
}
}
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: fix indirect calls helpers for ptype list hooks.
2019-06-03 10:46 [PATCH net] net: fix indirect calls helpers for ptype list hooks Paolo Abeni
@ 2019-06-03 14:03 ` Edward Cree
2019-06-03 17:29 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Edward Cree @ 2019-06-03 14:03 UTC (permalink / raw)
To: Paolo Abeni, netdev; +Cc: David S. Miller, Eric Dumazet
On 03/06/2019 11:46, Paolo Abeni wrote:
> 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.
>
> Fixes: 92884ca8830b ("net: fix indirect calls helpers for ptype list hooks.")
> Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Edward Cree <ecree@solarflare.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: fix indirect calls helpers for ptype list hooks.
2019-06-03 10:46 [PATCH net] net: fix indirect calls helpers for ptype list hooks Paolo Abeni
2019-06-03 14:03 ` Edward Cree
@ 2019-06-03 17:29 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-06-03 17:29 UTC (permalink / raw)
To: pabeni; +Cc: netdev, ecree, edumazet
From: Paolo Abeni <pabeni@redhat.com>
Date: Mon, 3 Jun 2019 12:46:43 +0200
> Fixes: 92884ca8830b ("net: fix indirect calls helpers for ptype list hooks.")
This doesn't seem to be a valid GIT SHA1_ID.
[davem@localhost net]$ git describe 92884ca8830b
fatal: Not a valid object name 92884ca8830b
Please respin with this fixed.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-03 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-03 10:46 [PATCH net] net: fix indirect calls helpers for ptype list hooks Paolo Abeni
2019-06-03 14:03 ` Edward Cree
2019-06-03 17:29 ` David Miller
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).