git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sctp: deny peeloff operation on asocs with threads sleeping on it
[pandora-kernel.git]
/
net
/
sctp
/
socket.c
diff --git
a/net/sctp/socket.c
b/net/sctp/socket.c
index
ccbd6d0
..
93ea5ac
100644
(file)
--- 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;
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.
*/
/* 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);
*/
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;
sctp_lock_sock(sk);
*timeo_p = current_timeo;