mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.6] DECnet typo in accept causes oops
@ 2004-11-29 16:05 Patrick Caulfield
  2004-11-30  3:56 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Caulfield @ 2004-11-29 16:05 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel, DECnet list

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@tykepenguin.com>

===== 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);
 		}
 	}
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-30  3:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 16:05 [PATCH 2.6] DECnet typo in accept causes oops Patrick Caulfield
2004-11-30  3:56 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®