Please read the rest of today's postings, Alexey Kuznetsov already
posted the correct fix, which I'm attached below:
diff -u --recursive --new-file --exclude=CVS --exclude=.cvsignore vanilla/linux/net/core/datagram.c linux/net/core/datagram.c
--- vanilla/linux/net/core/datagram.c Sat Nov 11 19:02:40 2000
+++ linux/net/core/datagram.c Thu Feb 1 17:15:12 2001
@@ -72,19 +73,19 @@
/* Socket errors? */
error = sock_error(sk);
if (error)
- goto out;
+ goto out_err;
if (!skb_queue_empty(&sk->receive_queue))
goto ready;
/* Socket shut down? */
if (sk->shutdown & RCV_SHUTDOWN)
- goto out;
+ goto out_noerr;
/* Sequenced packets can come disconnected. If so we report the problem */
error = -ENOTCONN;
if(connection_based(sk) && !(sk->state==TCP_ESTABLISHED || sk->state==TCP_LISTEN))
- goto out;
+ goto out_err;
/* handle signals */
if (signal_pending(current))
@@ -99,11 +100,16 @@
interrupted:
error = sock_intr_errno(*timeo_p);
+out_err:
+ *err = error;
out:
current->state = TASK_RUNNING;
remove_wait_queue(sk->sleep, &wait);
- *err = error;
return error;
+out_noerr:
+ *err = 0;
+ error = 1;
+ goto out;
}
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/