From: Eric Dumazet Date: Fri, 2 Jun 2017 15:02:26 +0000 (-0700) Subject: dccp: consistently use dccp_write_space() X-Git-Tag: v4.14-rc1~596^2~298 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e2f6dd298beb93c30e1699a5c26492a10214447;p=platform%2Fkernel%2Flinux-rpi.git dccp: consistently use dccp_write_space() DCCP uses dccp_write_space() for sk->sk_write_space method. Unfortunately a passive connection (as provided by accept()) is using the generic sk_stream_write_space() function. Lets simply inherit sk->sk_write_space from the parent instead of forcing the generic one. Signed-off-by: Eric Dumazet Cc: Gerrit Renker Signed-off-by: David S. Miller --- diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 82dec88..a3fa1a5 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -790,7 +790,6 @@ struct sock *inet_csk_clone_lock(const struct sock *sk, inet_sk(newsk)->inet_dport = inet_rsk(req)->ir_rmt_port; inet_sk(newsk)->inet_num = inet_rsk(req)->ir_num; inet_sk(newsk)->inet_sport = htons(inet_rsk(req)->ir_num); - newsk->sk_write_space = sk_stream_write_space; /* listeners have SOCK_RCU_FREE, not the children */ sock_reset_flag(newsk, SOCK_RCU_FREE);