svn commit: r256991 - in projects/vps/sys: kern rpc
Will Andrews
will at FreeBSD.org
Wed Oct 23 17:13:08 UTC 2013
Author: will
Date: Wed Oct 23 17:13:07 2013
New Revision: 256991
URL: http://svnweb.freebsd.org/changeset/base/256991
Log:
Sync with svn.7he.at/vps/trunk r192.
r192 | klaus | 2013-07-18 06:18:16 -0600 (Thu, 18 Jul 2013) | 3 lines
Fixed missing ucred->cr_vps pointers for nfs server.
Submitted by: Klaus P. Ohrhallinger <k at 7he.at>
Modified:
projects/vps/sys/kern/kern_prot.c
projects/vps/sys/kern/vfs_export.c
projects/vps/sys/rpc/svc_auth.c
Modified: projects/vps/sys/kern/kern_prot.c
==============================================================================
--- projects/vps/sys/kern/kern_prot.c Wed Oct 23 17:11:52 2013 (r256990)
+++ projects/vps/sys/kern/kern_prot.c Wed Oct 23 17:13:07 2013 (r256991)
@@ -1863,8 +1863,11 @@ crfree(struct ucred *cr)
struct vps *vps_save;
vps_save = curthread->td_vps;
- KASSERT(cr->cr_vps != NULL, ("%s: cr->cr_vps == NULL", __func__));
- KASSERT((cr->cr_ref & 0xffff0000) != 0xdead0000, ("dangling reference to ucred 2: cr=%p cr_ref=%08x", cr, cr->cr_ref));
+ KASSERT(cr->cr_vps != NULL,
+ ("%s: cr->cr_vps == NULL, cr=%p", __func__, cr));
+ KASSERT((cr->cr_ref & 0xffff0000) != 0xdead0000,
+ ("%s: dangling reference to ucred 2: cr=%p cr_ref=%08x",
+ __func__, cr, cr->cr_ref));
#endif
KASSERT(cr->cr_ref > 0, ("bad ucred refcount: %d", cr->cr_ref));
Modified: projects/vps/sys/kern/vfs_export.c
==============================================================================
--- projects/vps/sys/kern/vfs_export.c Wed Oct 23 17:11:52 2013 (r256990)
+++ projects/vps/sys/kern/vfs_export.c Wed Oct 23 17:13:07 2013 (r256991)
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <sys/vnode.h>
#include <vps/vps.h>
+#include <vps/vps2.h>
#include <net/radix.h>
@@ -129,6 +130,10 @@ vfs_hang_addrlist(struct mount *mp, stru
argp->ex_anon.cr_groups);
np->netc_anon->cr_prison = V_prison0;
prison_hold(np->netc_anon->cr_prison);
+#ifdef VPS
+ np->netc_anon->cr_vps = curthread->td_vps;
+ vps_ref(np->netc_anon->cr_vps, np->netc_anon);
+#endif
np->netc_numsecflavors = argp->ex_numsecflavors;
bcopy(argp->ex_secflavors, np->netc_secflavors,
sizeof(np->netc_secflavors));
@@ -215,6 +220,10 @@ vfs_hang_addrlist(struct mount *mp, stru
argp->ex_anon.cr_groups);
np->netc_anon->cr_prison = V_prison0;
prison_hold(np->netc_anon->cr_prison);
+#ifdef VPS
+ np->netc_anon->cr_vps = curthread->td_vps;
+ vps_ref(np->netc_anon->cr_vps, np->netc_anon);
+#endif
np->netc_numsecflavors = argp->ex_numsecflavors;
bcopy(argp->ex_secflavors, np->netc_secflavors,
sizeof(np->netc_secflavors));
Modified: projects/vps/sys/rpc/svc_auth.c
==============================================================================
--- projects/vps/sys/rpc/svc_auth.c Wed Oct 23 17:11:52 2013 (r256990)
+++ projects/vps/sys/rpc/svc_auth.c Wed Oct 23 17:13:07 2013 (r256991)
@@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
#include <sys/ucred.h>
#include <vps/vps.h>
+#include <vps/vps2.h>
#include <rpc/rpc.h>
@@ -185,6 +186,10 @@ svc_getcred(struct svc_req *rqst, struct
cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0];
cr->cr_prison = V_prison0;
prison_hold(cr->cr_prison);
+#ifdef VPS
+ cr->cr_vps = curthread->td_vps;
+ vps_ref(cr->cr_vps, cr);
+#endif
*crp = cr;
return (TRUE);
More information about the svn-src-projects
mailing list