Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2013 11:09:16 +0000 (UTC)
From:      Sergey Kandaurov <pluknet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r246463 - stable/8/sys/kern
Message-ID:  <201302071109.r17B9GG2019165@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pluknet
Date: Thu Feb  7 11:09:16 2013
New Revision: 246463
URL: http://svnweb.freebsd.org/changeset/base/246463

Log:
  MFC r226043 (manually):
  
  Remove assertion against empty NFSv4 ACLs.  An empty ACL is not exactly
  valid - we don't allow for setting it on a file, for example - but it's
  not something we should assert on.
  
  For STABLE kernel, it changes nothing, because it's not compiled with
  INVARIANTS.  If it was, it would fix crashes.  It also fixes an assert
  in libc encountered with NFSv4 without nfsuserd(8) running.
  
  Approved by:	trasz

Modified:
  stable/8/sys/kern/subr_acl_nfs4.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/kern/subr_acl_nfs4.c
==============================================================================
--- stable/8/sys/kern/subr_acl_nfs4.c	Thu Feb  7 11:08:03 2013	(r246462)
+++ stable/8/sys/kern/subr_acl_nfs4.c	Thu Feb  7 11:09:16 2013	(r246463)
@@ -105,7 +105,6 @@ _acl_denies(const struct acl *aclp, int 
 	if (denied_explicitly != NULL)
 		*denied_explicitly = 0;
 
-	KASSERT(aclp->acl_cnt > 0, ("aclp->acl_cnt > 0"));
 	KASSERT(aclp->acl_cnt <= ACL_MAX_ENTRIES,
 	    ("aclp->acl_cnt <= ACL_MAX_ENTRIES"));
 
@@ -730,7 +729,6 @@ acl_nfs4_sync_mode_from_acl(mode_t *_mod
 	mode_t old_mode = *_mode, mode = 0, seen = 0;
 	const struct acl_entry *entry;
 
-	KASSERT(aclp->acl_cnt > 0, ("aclp->acl_cnt > 0"));
 	KASSERT(aclp->acl_cnt <= ACL_MAX_ENTRIES,
 	    ("aclp->acl_cnt <= ACL_MAX_ENTRIES"));
 
@@ -856,7 +854,6 @@ acl_nfs4_compute_inherited_acl(const str
 	struct acl_entry *entry, *copy;
 
 	KASSERT(child_aclp->acl_cnt == 0, ("child_aclp->acl_cnt == 0"));
-	KASSERT(parent_aclp->acl_cnt > 0, ("parent_aclp->acl_cnt > 0"));
 	KASSERT(parent_aclp->acl_cnt <= ACL_MAX_ENTRIES,
 	    ("parent_aclp->acl_cnt <= ACL_MAX_ENTRIES"));
 



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