Subject: Re: kern/32856: panic: uipc 3
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 02/28/2006 17:00:08
The following reply was made to PR kern/32856; it has been noted by GNATS.
From: Christian Biere <christianbiere@gmx.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/32856: panic: uipc 3
Date: Tue, 28 Feb 2006 17:57:37 +0100
This bug is also present in FreeBSD and OpenBSD. It was fixed in
OpenBSD by Miod Vallat yesterday. The same solution works for
NetBSD as well. See the below patch.
Index: uipc_usrreq.c
===================================================================
RCS file: /cvsroot/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.86
diff -u -p -u -r1.86 uipc_usrreq.c
--- uipc_usrreq.c 11 Dec 2005 12:24:30 -0000 1.86
+++ uipc_usrreq.c 28 Feb 2006 16:51:26 -0000
@@ -339,8 +339,10 @@ uipc_usrreq(struct socket *so, int req,
case SOCK_STREAM:
#define rcv (&so2->so_rcv)
#define snd (&so->so_snd)
- if (unp->unp_conn == 0)
- panic("uipc 3");
+ if (unp->unp_conn == 0) {
+ error = ENOTCONN;
+ break;
+ }
so2 = unp->unp_conn->unp_socket;
if (unp->unp_conn->unp_flags & UNP_WANTCRED) {
/*
--
Christian