[PATCH 2.6] DECnet typo in accept causes oops

From: Patrick Caulfield
Date: Mon Nov 29 2004 - 11:09:35 EST


This patch fixes typo which can cause a rare oops in accept. dn_accept returns
a pointer instead of an error if dn_wait_for_connect() is interrupted.
This confuses sys_accept which calls dn_getname with a incomplete struct socket,
this then oopses.

patrick


Signed-off-by: Patrick Caulfield <patrick@xxxxxxxxxxxxxxx>

===== net/decnet/af_decnet.c 1.45 vs edited =====
--- 1.45/net/decnet/af_decnet.c 2004-11-06 07:43:31 +00:00
+++ edited/net/decnet/af_decnet.c 2004-11-29 15:56:40 +00:00
@@ -1075,7 +1075,7 @@ static int dn_accept(struct socket *sock
skb = dn_wait_for_connect(sk, &timeo);
if (IS_ERR(skb)) {
release_sock(sk);
- return PTR_ERR(sk);
+ return PTR_ERR(skb);
}
}

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