]> git.baikalelectronics.ru Git - kernel.git/commit
net: clear sk_err_soft in sk_clone_lock()
authorEric Dumazet <edumazet@google.com>
Fri, 28 Oct 2016 20:40:24 +0000 (13:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Oct 2016 19:25:55 +0000 (15:25 -0400)
commit7db70259c862660db07c45f2d079f149088ecdb6
treed9bf9bc1978e78b74c4df3f2e6cfdead536c1b33
parentdd468b8eced6b09014c6b0297ec8a3d4a98aa5ba
net: clear sk_err_soft in sk_clone_lock()

At accept() time, it is possible the parent has a non zero
sk_err_soft, leftover from a prior error.

Make sure we do not leave this value in the child, as it
makes future getsockopt(SO_ERROR) calls quite unreliable.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c