af_iucv: handle non-accepted sockets after resuming from suspend
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Wed, 16 Sep 2009 04:37:26 +0000 (04:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Sep 2009 03:57:36 +0000 (20:57 -0700)
After resuming from suspend, all af_iucv sockets are disconnected.
Ensure that iucv_accept_dequeue() can handle disconnected sockets
which are not yet accepted.

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 21ee68be02eec9ea896943961ed8a4ee55ee4e11..a48fd28715329644494b1400d8388b393f0c5e53 100644 (file)
@@ -569,6 +569,7 @@ struct sock *iucv_accept_dequeue(struct sock *parent, struct socket *newsock)
 
                if (sk->sk_state == IUCV_CONNECTED ||
                    sk->sk_state == IUCV_SEVERED ||
+                   sk->sk_state == IUCV_DISCONN ||     /* due to PM restore */
                    !newsock) {
                        iucv_accept_unlink(sk);
                        if (newsock)