From owner-freebsd-current@FreeBSD.ORG Wed Jun 3 20:01:09 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 588221065677; Wed, 3 Jun 2009 20:01:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6778FC08; Wed, 3 Jun 2009 20:01:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id C80F641C758; Wed, 3 Jun 2009 21:45:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id O7ufZ4IE71FI; Wed, 3 Jun 2009 21:45:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 639F941C757; Wed, 3 Jun 2009 21:45:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 4CEB44448E6; Wed, 3 Jun 2009 19:42:24 +0000 (UTC) Date: Wed, 3 Jun 2009 19:42:23 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Wesley Shields In-Reply-To: <20090603160945.GC21014@atarininja.org> Message-ID: <20090603184215.L12292@maildrop.int.zabbadoz.net> References: <20090601182012.GA21543@darkthrone.kvedulv.de> <20090603121307.GA15659@hades.panopticon> <20090603152810.GA21014@atarininja.org> <20090603160945.GC21014@atarininja.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Michael Moll , dfr@freebsd.org, Dmitry Marakasov , Jamie Gritton , freebsd-current@freebsd.org Subject: Re: Kernel panic when accessing ZFS-Filesystem via NFS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 20:01:09 -0000 On Wed, 3 Jun 2009, Wesley Shields wrote: Hi, >>>>... > [ The panic message and backtrace from ddb is at > http://people.freebsd.org/~wxs/crash.txt ] > ... > cred->cr_prison is null? It is my understanding that when not jailed > cred->cr_prison should be &prison0 with the new hierarchical jails. The > fact that it is null is causing prison_priv_check to enter the switch > statement, leading to the crash. > > I'm not sure why cred->cr_prison is null in this case. The question here is not if cred->cr_prison can be null but where is the cred coming from? If you look at init_main.c around lines 440 - 457 you'll find prison0 being further initialized (cpuset) and p_ucred->cr_prison being set to &prsion0. And a bit further down in l470 td_ucred is initialized from that. cr_prison should thus always be setup. What you are looking at above looks like a crget() with only cr_ngroups updated. [removing a lot more text as I was going on debugging in a very small window] I would start looking at svc_getcred() and blame at least the AUTH_UNIX case; end of rpc/svc_auth.c. This looks like a big NO-NO. I am pretty sure I'd also want to audit svc_rpc_gss(), just in case. /bz -- Bjoern A. Zeeb The greatest risk is not taking one.