mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
tcp: add RETPOLINE mitigation to sk_backlog_rcv
Use INDIRECT_CALL_INET() to avoid an indirect call when/if CONFIG_RETPOLINE=y Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
93afcfd1db
commit
d2489c7b6d
3 changed files with 14 additions and 4 deletions
|
@ -327,7 +327,10 @@ int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
|
|||
BUG_ON(!sock_flag(sk, SOCK_MEMALLOC));
|
||||
|
||||
noreclaim_flag = memalloc_noreclaim_save();
|
||||
ret = sk->sk_backlog_rcv(sk, skb);
|
||||
ret = INDIRECT_CALL_INET(sk->sk_backlog_rcv,
|
||||
tcp_v6_do_rcv,
|
||||
tcp_v4_do_rcv,
|
||||
sk, skb);
|
||||
memalloc_noreclaim_restore(noreclaim_flag);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue