AF_UNIX hangs

From: Alan Cox (
Date: Thu Feb 01 2001 - 13:51:11 EST

Looking at net/core/datagram.c:wait_for_packet the code will return 0
when the socket has been shutdown. That causes skb_recv_datagram to loop
which is in itself obviously incorrect for a shutdown socket (its in EOF

I suspect it should read something like

        /* Socket shut down? */
        if (sk->shutdown & RCV_SHUTDOWN)
                   current->state = TASK_RUNNING;
                  remove_wait_queue(sk->sleep, &wait);
                 *err = 0;
                 return 1;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Feb 07 2001 - 21:00:13 EST