Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jun 2009 20:51:31 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193650 - head/sys/rpc
Message-ID:  <200906072051.n57KpVtF005145@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Sun Jun  7 20:51:31 2009
New Revision: 193650
URL: http://svn.freebsd.org/changeset/base/193650

Log:
  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

Modified:
  head/sys/rpc/svc_auth.c

Modified: head/sys/rpc/svc_auth.c
==============================================================================
--- head/sys/rpc/svc_auth.c	Sun Jun  7 20:38:41 2009	(r193649)
+++ head/sys/rpc/svc_auth.c	Sun Jun  7 20:51:31 2009	(r193650)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/systm.h>
+#include <sys/jail.h>
 #include <sys/ucred.h>
 
 #include <rpc/rpc.h>
@@ -181,6 +182,8 @@ svc_getcred(struct svc_req *rqst, struct
 		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);
 



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