Re: crash-o-matic

Andrea Arcangeli (andrea@suse.de)
Sat, 17 Jul 1999 14:52:09 +0200 (CEST)


It seems to me there's no need to hash the bucket in the bind hashlist if
there's no ->connect. Patch against 2.2.10-ac10:

--- linux-2.2.10/net/ipv4/af_inet.c~ Sat Jul 17 01:56:16 1999
+++ linux-2.2.10/net/ipv4/af_inet.c Sat Jul 17 03:05:41 1999
@@ -560,10 +560,10 @@
struct sock *sk=sock->sk;
int err;

- if (inet_autobind(sk) != 0)
- return(-EAGAIN);
if (sk->prot->connect == NULL)
return(-EOPNOTSUPP);
+ if (inet_autobind(sk) != 0)
+ return(-EAGAIN);
err = sk->prot->connect(sk, (struct sockaddr *)uaddr, addr_len);
if (err < 0)
return(err);

Andrea

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