diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2012-02-07 19:19:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-08 18:50:19 -0500 |
commit | 7f1b0ea42a800713a3d56e1e8ca1a845e0461ca2 (patch) | |
tree | 2649a3dba13c62fbd8d48836e501743ac03a56c9 /net/iucv/af_iucv.c | |
parent | 7d316b9453523498246e9e19a659c423d4c5081e (diff) |
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 <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/iucv/af_iucv.c')
-rw-r--r-- | net/iucv/af_iucv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 3ce0259499ed..ef6ab71921fc 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, | |||
1490 | if (sk->sk_state == IUCV_DISCONN) | 1490 | if (sk->sk_state == IUCV_DISCONN) |
1491 | mask |= POLLIN; | 1491 | mask |= POLLIN; |
1492 | 1492 | ||
1493 | if (sock_writeable(sk)) | 1493 | if (sock_writeable(sk) && iucv_below_msglim(sk)) |
1494 | mask |= POLLOUT | POLLWRNORM | POLLWRBAND; | 1494 | mask |= POLLOUT | POLLWRNORM | POLLWRBAND; |
1495 | else | 1495 | else |
1496 | set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); | 1496 | set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); |