]> git.baikalelectronics.ru Git - kernel.git/commitdiff
af_iucv: Reject incoming msgs if RECV_SHUTDOWN is set
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Tue, 21 Apr 2009 06:04:22 +0000 (06:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2009 06:43:14 +0000 (23:43 -0700)
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>
net/iucv/af_iucv.c

index 42b3be302c57fd6757f4d91f79cd459b11acfe1d..ee517108856e26f2466c54e7cc5475fc0d26b9f2 100644 (file)
@@ -1116,8 +1116,10 @@ static void iucv_callback_rx(struct iucv_path *path, struct iucv_message *msg)
        struct sock_msg_q *save_msg;
        int len;
 
-       if (sk->sk_shutdown & RCV_SHUTDOWN)
+       if (sk->sk_shutdown & RCV_SHUTDOWN) {
+               iucv_message_reject(path, msg);
                return;
+       }
 
        if (!list_empty(&iucv->message_q.list) ||
            !skb_queue_empty(&iucv->backlog_skb_q))