Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jan 2009 10:47:36 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-current@freebsd.org, current@freebsd.org, Alfred Perlstein <alfred@freebsd.org>
Subject:   Re: panic: mutex Giant not owned at /usr/src/sys/kern/tty_ttydisc.c:1127
Message-ID:  <bb4a86c70901241047q82cac92ge20ff6dae882447b@mail.gmail.com>
In-Reply-To: <200901241120.46889.hselasky@c2i.net>
References:  <20090123154336.GJ60948@e.0x20.net> <200901240952.21670.hselasky@c2i.net> <bb4a86c70901240138g6a221fd4rbab3945193e4617@mail.gmail.com> <200901241120.46889.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>> > Yes, but you are already dropping an extra reference in ubt_shutdown().
>> > What about that?
>>
>> shutdown method is called as part of ng_rmnode_self() and drop the
>> reference that node was born with. the extra reference before
>> ng_rmnode_self() is to ensure that node pointer is still valid after
>> ng_rmnode_self() returns. otherwise there is a change that node
>> pointer becomes invalid while after ng_rmnode_self() calls shutdown
>> method.
>
> I've now explicitly tested this and found that if I drop the node reference in
> shutdown I end up with a zero node reference in detach! So the
> NG_NODE_UNREF() should not be in the ubt_shutdown !!!
>
> This is maybe the reason why Lars was getting a panic!
>
> http://perforce.freebsd.org/chv.cgi?CH=156600

i think those changes are not correct. Lars's panic has nothing to do
with detach(), imo. i beg you to stop posing your private ng_ubt2
patches for just one sec and let me work on this. right now, i'm
confused because i do not know what code Lars is running and it makes
it very hard to troubleshoot problems.

thanks,
max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70901241047q82cac92ge20ff6dae882447b>