From 7f1b0ea42a800713a3d56e1e8ca1a845e0461ca2 Mon Sep 17 00:00:00 2001 From: Ursula Braun Date: Wed, 8 Feb 2012 00:19:46 +0000 Subject: af_iucv: block writing if msg limit is exceeded When polling on an AF_IUCV socket, writing should be blocked if the number of pending messages exceeds a defined limit. Signed-off-by: Ursula Braun Signed-off-by: Frank Blaschka Signed-off-by: David S. Miller --- net/iucv/af_iucv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/iucv/af_iucv.c') diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 3ce0259499e..ef6ab71921f 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -1490,7 +1490,7 @@ unsigned int iucv_sock_poll(struct file *file, struct socket *sock, if (sk->sk_state == IUCV_DISCONN) mask |= POLLIN; - if (sock_writeable(sk)) + if (sock_writeable(sk) && iucv_below_msglim(sk)) mask |= POLLOUT | POLLWRNORM | POLLWRBAND; else set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); -- cgit v1.2.3