Re: [PATCH] bug in sock.c

From: Jeroen Vreeken (pe1rxq@amsat.org)
Date: Mon Nov 19 2001 - 14:53:16 EST


This patch is so popular that some people requested it again but this time
inline :)

So here it is again:

--- linux-2.4.13/net/core/sock.c Fri Nov 15 21:12:38 2001
+++ linux/net/core/sock.c Fri Nov 16 20:53:55 2001
@@ -81,6 +81,7 @@
  * Andi Kleen : Fix write_space callback
  * Chris Evans : Security fixes - signedness again
  * Arnaldo C. Melo : cleanups, use skb_queue_purge
+ * Jeroen Vreeken : Add check for sk->dead in
sock_def_write_space
  *
  * To Fix:
  *
@@ -1130,7 +1131,7 @@
        /* Do not wake up a writer until he can make "significant"
         * progress. --DaveM
         */
- if((atomic_read(&sk->wmem_alloc) << 1) <= sk->sndbuf) {
+ if(!sk->dead && (atomic_read(&sk->wmem_alloc) << 1) <= sk->sndbuf)
{
                if (sk->sleep && waitqueue_active(sk->sleep))
                        wake_up_interruptible(sk->sleep);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:21 EST