aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/rose/af_rose.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 1ebf65294405..af86bcb604e5 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -566,13 +566,11 @@ static struct sock *rose_make_new(struct sock *osk)
566#endif 566#endif
567 567
568 sk->sk_type = osk->sk_type; 568 sk->sk_type = osk->sk_type;
569 sk->sk_socket = osk->sk_socket;
570 sk->sk_priority = osk->sk_priority; 569 sk->sk_priority = osk->sk_priority;
571 sk->sk_protocol = osk->sk_protocol; 570 sk->sk_protocol = osk->sk_protocol;
572 sk->sk_rcvbuf = osk->sk_rcvbuf; 571 sk->sk_rcvbuf = osk->sk_rcvbuf;
573 sk->sk_sndbuf = osk->sk_sndbuf; 572 sk->sk_sndbuf = osk->sk_sndbuf;
574 sk->sk_state = TCP_ESTABLISHED; 573 sk->sk_state = TCP_ESTABLISHED;
575 sk->sk_sleep = osk->sk_sleep;
576 sock_copy_flags(sk, osk); 574 sock_copy_flags(sk, osk);
577 575
578 init_timer(&rose->timer); 576 init_timer(&rose->timer);
@@ -924,14 +922,12 @@ static int rose_accept(struct socket *sock, struct socket *newsock, int flags)
924 goto out_release; 922 goto out_release;
925 923
926 newsk = skb->sk; 924 newsk = skb->sk;
927 newsk->sk_socket = newsock; 925 sock_graft(newsk, newsock);
928 newsk->sk_sleep = &newsock->wait;
929 926
930 /* Now attach up the new socket */ 927 /* Now attach up the new socket */
931 skb->sk = NULL; 928 skb->sk = NULL;
932 kfree_skb(skb); 929 kfree_skb(skb);
933 sk->sk_ack_backlog--; 930 sk->sk_ack_backlog--;
934 newsock->sk = newsk;
935 931
936out_release: 932out_release:
937 release_sock(sk); 933 release_sock(sk);