X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=net%2Fsctp%2Fsocket.c;h=93ea5ac2c7be498c427cf6e9974c19397b0f8175;hp=ccbd6d08e77367ac83c37050a707c1b85b04e9b9;hb=6c24f53714319676adf7ab0d2d081e4b9de35bad;hpb=8b9f297cd4171ffaec7441b38cecd61f9c5b3a7f diff --git a/net/sctp/socket.c b/net/sctp/socket.c index ccbd6d08e773..93ea5ac2c7be 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4242,6 +4242,12 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc, struct sctp_af *af; int err = 0; + /* If there is a thread waiting on more sndbuf space for + * sending on this asoc, it cannot be peeled. + */ + if (waitqueue_active(&asoc->wait)) + return -EBUSY; + /* An association cannot be branched off from an already peeled-off * socket, nor is this supported for tcp style sockets. */ @@ -6492,8 +6498,6 @@ static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p, */ sctp_release_sock(sk); current_timeo = schedule_timeout(current_timeo); - if (sk != asoc->base.sk) - goto do_error; sctp_lock_sock(sk); *timeo_p = current_timeo;