From owner-cvs-src@FreeBSD.ORG Sat Sep 2 21:54:09 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A489716A4DF; Sat, 2 Sep 2006 21:54:09 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3963B43D49; Sat, 2 Sep 2006 21:54:09 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k82Ls9sE076872; Sat, 2 Sep 2006 21:54:09 GMT (envelope-from csjp@repoman.freebsd.org) Received: (from csjp@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k82Ls9cO076871; Sat, 2 Sep 2006 21:54:09 GMT (envelope-from csjp) Message-Id: <200609022154.k82Ls9cO076871@repoman.freebsd.org> From: "Christian S.J. Peron" Date: Sat, 2 Sep 2006 21:54:08 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/nfsserver nfs.h nfs_serv.c nfs_srvsock.c nfs_syscalls.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Sep 2006 21:54:09 -0000 csjp 2006-09-02 21:54:08 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/nfsserver nfs.h nfs_serv.c nfs_srvsock.c nfs_syscalls.c Log: MFC revision 1.79 nfs.h MFC revision 1.161 nfs_serv.c MFC revision 1.96 nfs_srvsock.c MFC revision 1.105 nfs_syscalls.c date: 2006/01/28 19:24:39; author: csjp; state: Exp; lines: +1 -1 Manage the ucred for the NFS server using the crget/crfree API defined in kern_prot.c. This API handles reference counting among many other things. Notably, if MAC is compiled into the kernel, it will properly initialize the MAC labels when the ucred is allocated. This work is in preparation for a new MAC entry point which will be responsible for properly initializing policy specific labels for the NFS server credential. Utilization of the crfree/crget APIs reduce the complexity associated with this label's management. Submitted by: green (with changes) [1] Obtained from: TrustedBSD Project Discussed with: rwatson, alfred [1] I moved the ucred allocation outside the scope of the NFS server lock to prevent M_WAIKOK allocations from occurring with non-sleep-able locks held. Additionally, to reduce complexity, the ucred persist as long as the NFS server descriptor. Revision Changes Path 1.78.2.2 +1 -1 src/sys/nfsserver/nfs.h 1.156.2.4 +24 -24 src/sys/nfsserver/nfs_serv.c 1.94.2.2 +11 -15 src/sys/nfsserver/nfs_srvsock.c 1.103.2.1 +8 -0 src/sys/nfsserver/nfs_syscalls.c