From: David S. Miller Date: Mon, 3 May 2010 04:43:40 +0000 (-0700) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Tag: firefly_0821_release~9833^2~2087^2~295 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7ef527377b88ff05fb122a47619ea506c631c914;p=firefly-linux-kernel-4.4.55.git Merge branch 'master' of /linux/kernel/git/davem/net-2.6 --- 7ef527377b88ff05fb122a47619ea506c631c914 diff --cc net/sctp/socket.c index d54700af927a,44a1ab03a3f0..bae764005d2d --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@@ -3719,9 -3719,12 +3719,9 @@@ SCTP_STATIC int sctp_init_sock(struct s sp->hmac = NULL; SCTP_DBG_OBJCNT_INC(sock); - percpu_counter_inc(&sctp_sockets_allocated); - /* Set socket backlog limit. */ - sk->sk_backlog.limit = sysctl_sctp_rmem[1]; - local_bh_disable(); + percpu_counter_inc(&sctp_sockets_allocated); sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); local_bh_enable(); @@@ -6185,6 -6189,16 +6185,19 @@@ do_nonblock goto out; } + void sctp_data_ready(struct sock *sk, int len) + { - read_lock_bh(&sk->sk_callback_lock); - if (sk_has_sleeper(sk)) - wake_up_interruptible_sync_poll(sk->sk_sleep, POLLIN | ++ struct socket_wq *wq; ++ ++ rcu_read_lock(); ++ wq = rcu_dereference(sk->sk_wq); ++ if (wq_has_sleeper(wq)) ++ wake_up_interruptible_sync_poll(&wq->wait, POLLIN | + POLLRDNORM | POLLRDBAND); + sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); - read_unlock_bh(&sk->sk_callback_lock); ++ rcu_read_unlock(); + } + /* If socket sndbuf has changed, wake up all per association waiters. */ void sctp_write_space(struct sock *sk) {