aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2009-04-21 02:04:22 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-22 02:43:14 -0400
commitfe86e54ef9465c97a16337d2a41a4cf486b937ae (patch)
tree716996d116737a0acf6bcb714cb52a63f6095d43
parent60d3705fcbfe7deca8e94bc7ddecd6f9f1a4647e (diff)
af_iucv: Reject incoming msgs if RECV_SHUTDOWN is set
Reject incoming iucv messages if the receive direction has been shut down. It avoids that the queue of outstanding messages increases and exceeds the message limit of the iucv communication path. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/iucv/af_iucv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 42b3be302c57..ee517108856e 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -1116,8 +1116,10 @@ static void iucv_callback_rx(struct iucv_path *path, struct iucv_message *msg)
1116 struct sock_msg_q *save_msg; 1116 struct sock_msg_q *save_msg;
1117 int len; 1117 int len;
1118 1118
1119 if (sk->sk_shutdown & RCV_SHUTDOWN) 1119 if (sk->sk_shutdown & RCV_SHUTDOWN) {
1120 iucv_message_reject(path, msg);
1120 return; 1121 return;
1122 }
1121 1123
1122 if (!list_empty(&iucv->message_q.list) || 1124 if (!list_empty(&iucv->message_q.list) ||
1123 !skb_queue_empty(&iucv->backlog_skb_q)) 1125 !skb_queue_empty(&iucv->backlog_skb_q))