mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-21 17:25:09 +00:00
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
This commit is contained in:
parent
bca2ec16a6
commit
dab07fbcef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193650
|
@ -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 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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue