From dab07fbcefa6c8cb9bd48c286db53eec423e28f0 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 7 Jun 2009 20:51:31 +0000 Subject: [PATCH] Add a temporary workaround for panics being seen on NFS servers with ZFS, where an improperly initialized prison field could lead to a panic. This is not the correct solution, since it fails to address similar problems for both AUDIT and MAC, which also rely on properly initialized credentials, but should reduce panic reports while we work that out. Reported by: ps, kan, others --- sys/rpc/svc_auth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/rpc/svc_auth.c b/sys/rpc/svc_auth.c index 6d5a79b0003..2d2b73de170 100644 --- a/sys/rpc/svc_auth.c +++ b/sys/rpc/svc_auth.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -181,6 +182,8 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) for (i = 0; i < xcr->cr_ngroups; i++) cr->cr_groups[i] = xcr->cr_groups[i]; cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; + cr->cr_prison = &prison0; + prison_hold(cr->cr_prison); *crp = cr; return (TRUE);