Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jun 2000 16:59:29 +0200 (MET DST)
From:      Bart Thate <freebsd@1st.dudi.org>
To:        freebsd-current@freebsd.org
Subject:   current jail panic II 
Message-ID:  <Pine.LNX.3.95.1000613164425.8338A-100000@node1457.a2000.nl>

next in thread | raw e-mail | index | archive | help
Hi again ;)

this patch ..

http://www.FreeBSD.org/cgi/cvsweb.cgi/src/sys/kern/uipc_socket.c.diff?r1=1.72&r2=1.73

makes my kernel panic.

a snippet from gdb -k ..

#10 0xc01705b5 in socreate (dom=28, aso=0xca35df20, type=2, proto=0,
    p=0xc9959be0) at ../../kern/uipc_socket.c:138
138             if (p->p_prison && jail_socket_unixiproute_only &&
(kgdb) list
133             if (proto)
134                     prp = pffindproto(dom, proto, type);
135             else
136                     prp = pffindtype(dom, type);
137
138             if (p->p_prison && jail_socket_unixiproute_only &&
139                 prp->pr_domain->dom_family != PF_LOCAL &&
140                 prp->pr_domain->dom_family != PF_INET &&
141                 prp->pr_domain->dom_family != PF_ROUTE) {
142                     return (EPROTONOSUPPORT);
(kgdb) print prp
$1 = (struct protosw *) 0x0

prp is 0x0 but is not checked upon. The check if prp ==0 is done 2 lines
further on. 

      if (prp == 0 || prp->pr_usrreqs->pru_attach == 0)
                return (EPROTONOSUPPORT);


since both if-s return EPROTONOSUPPORT the fix is to move the prp == 0 if 
in front of the patches lines. 

Should i send-pr this?


Grtx,

Bart



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.1000613164425.8338A-100000>