Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Aug 2006 00:05:28 +0300
From:      "Gleb Kozyrev" <gkozyrev@ukr.net>
To:        "Robert Watson" <rwatson@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, bug-followup@FreeBSD.org
Subject:   Re: kern/101763: [panic] sodealloc(): so_count 1
Message-ID:  <000001c6bd89$e00ceaf0$0321080a@Gleb>
References:  <000301c6bc58$d678e930$0321080a@Gleb><20060810113709.P45647@fledge.watson.org><003201c6bc9a$f42c0970$0321080a@Gleb><000901c6bd22$0316a030$0321080a@Gleb> <20060811102701.X45647@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote to "Gleb Kozyrev" <gkozyrev@gmail.com> on Fri, 11 Aug 2006 10:29:01 +0100 (BST):

> GK>> Here you are: kern/101763
>> 
>> I'm sorry for misleading you.
>> You see, for some reasons I forgot that there's a little jail on
>> that machine. ;)
>> It is ipfw in jail that triggers the panic invoked from
>> /etc/periodic/security/500.ipfwdenied

RW> Try this minor tweak:

RW> Index: uipc_socket.c
RW> ===================================================================
RW> RCS file: /data/fbsd-cvs/ncvs/src/sys/kern/uipc_socket.c,v
RW> retrieving revision 1.277
RW> diff -u -r1.277 uipc_socket.c
RW> --- uipc_socket.c 2 Aug 2006 00:45:27 -0000 1.277
RW> +++ uipc_socket.c 11 Aug 2006 09:27:52 -0000
RW> @@ -367,6 +367,9 @@
RW>    so->so_count = 1;
RW>    error = (*prp->pr_usrreqs->pru_attach)(so, proto, td);
RW>    if (error) {
RW> +  KASSERT(so->so_count == 1, ("socreate: so_count %d",
RW> +      so->so_count));
RW> +  so->so_count = 0;
RW>     sodealloc(so);
RW>     return (error);
RW>    }

RW> Looks like I made a logic error in my change to move to sodealloc() here:
RW> the refcount is never reduced back from when it is initially set to 1,
RW> and sodealloc() has a "no references" assertion (possibly that I added).

It works fine now, thank you.

-- 
With best regards, Gleb Kozyrev. 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000001c6bd89$e00ceaf0$0321080a>