svn commit: r193650 - head/sys/rpc

Robert Watson rwatson at FreeBSD.org
Sun Jun 7 20:51:33 UTC 2009


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);
 


More information about the svn-src-all mailing list