From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Ursula Braun <ursula.braun@de.ibm.com>
Subject: [patch 2/6] [PATCH] af_iucv: block writing if msg limit is exceeded
Date: Wed, 08 Feb 2012 11:19:46 +0100 [thread overview]
Message-ID: <20120208102029.228513931@de.ibm.com> (raw)
In-Reply-To: 20120208101944.272235343@de.ibm.com
[-- Attachment #1: 602-af_iucv-msg-limit.diff --]
[-- Type: text/plain, Size: 716 bytes --]
From: Ursula Braun <ursula.braun@de.ibm.com>
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>
---
net/iucv/af_iucv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -1490,7 +1490,7 @@ unsigned int iucv_sock_poll(struct file
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);
next prev parent reply other threads:[~2012-02-08 10:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 10:19 [patch 0/6] s390: network driver features and fixes for net-next frank.blaschka
2012-02-08 10:19 ` [patch 1/6] [PATCH] af_iucv: remove IUCV-pathes completely frank.blaschka
2012-02-08 10:19 ` frank.blaschka [this message]
2012-02-08 10:19 ` [patch 3/6] [PATCH] af_iucv: change net_device handling for HS transport frank.blaschka
2012-02-08 10:19 ` [patch 4/6] [PATCH] af_iucv: allow retrieval of maximum message size frank.blaschka
2012-02-08 10:19 ` [patch 5/6] [PATCH] qeth: add query OSA address table support frank.blaschka
2012-02-08 10:19 ` [patch 6/6] [PATCH] qeth: add wake_up on write channel frank.blaschka
2012-02-09 1:28 ` [patch 0/6] s390: network driver features and fixes for net-next David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120208102029.228513931@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ursula.braun@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).