]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: drop dst in tcp_add_backlog()
authorEric Dumazet <edumazet@google.com>
Tue, 20 Nov 2018 01:45:55 +0000 (17:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Nov 2018 18:25:47 +0000 (10:25 -0800)
commitdc1bb0670e8ea5c903d46dd48a616b003395a79f
treed015d9a05254a6a6e05fc64f17f32743610b5d9d
parentc96b38f75448c994398b543bcc715ecc82dd58d0
tcp: drop dst in tcp_add_backlog()

Under stress, softirq rx handler often hits a socket owned by the user,
and has to queue the packet into socket backlog.

When this happens, skb dst refcount is taken before we escape rcu
protected region. This is done from __sk_add_backlog() calling
skb_dst_force().

Consumer will have to perform the opposite costly operation.

AFAIK nothing in tcp stack requests the dst after skb was stored
in the backlog. If this was the case, we would have had failures
already since skb_dst_force() can end up clearing skb dst anyway.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c