]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: clear pfmemalloc on outgoing skb
authorEric Dumazet <edumazet@google.com>
Fri, 3 Feb 2017 04:40:08 +0000 (20:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Feb 2017 21:23:57 +0000 (16:23 -0500)
commit19a64d3e76471179c1026b77031f1492187599f8
tree659bcbc397163954d2845ef6f438996da8ee1412
parent376b5220961367da0eb3739a7e75dced43875f1e
tcp: clear pfmemalloc on outgoing skb

Josef Bacik diagnosed following problem :

   I was seeing random disconnects while testing NBD over loopback.
   This turned out to be because NBD sets pfmemalloc on it's socket,
   however the receiving side is a user space application so does not
   have pfmemalloc set on its socket. This means that
   sk_filter_trim_cap will simply drop this packet, under the
   assumption that the other side will simply retransmit. Well we do
   retransmit, and then the packet is just dropped again for the same
   reason.

It seems the better way to address this problem is to clear pfmemalloc
in the TCP transmit path. pfmemalloc strict control really makes sense
on the receive path.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c