From owner-freebsd-fs@FreeBSD.ORG Mon Nov 29 01:08:09 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5147106566C for ; Mon, 29 Nov 2010 01:08:09 +0000 (UTC) (envelope-from james-freebsd-fs2@jrv.org) Received: from mail.jrv.org (adsl-70-243-84-13.dsl.austtx.swbell.net [70.243.84.13]) by mx1.freebsd.org (Postfix) with ESMTP id A24AF8FC0C for ; Mon, 29 Nov 2010 01:08:09 +0000 (UTC) Received: from kremvax.housenet.jrv (kremvax.housenet.jrv [192.168.3.124]) by mail.jrv.org (8.14.3/8.14.3) with ESMTP id oAT0plF3093216; Sun, 28 Nov 2010 18:51:48 -0600 (CST) (envelope-from james-freebsd-fs2@jrv.org) Authentication-Results: mail.jrv.org; domainkeys=pass (testing) header.from=james-freebsd-fs2@jrv.org DomainKey-Signature: a=rsa-sha1; s=enigma; d=jrv.org; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:cc:subject: references:in-reply-to:content-type:content-transfer-encoding; b=ZNsuagqzqqmgeNLUe8v5phUoYm9PGdG7ibWjr2NbM+K7WxeJbJ0eNSQqKAIY/U41b AFHaLxdtBNsOV4h6hTJe8S4mgE9ZoA5Xp49uAY7d/95n1DgMmL+8VtLHE5VhOQ3wXji p0GAAUW4y1MYMUgAZNxQ8uVEpqkJmgj1lT8/7pw= Message-ID: <4CF2F923.1050104@jrv.org> Date: Sun, 28 Nov 2010 18:51:47 -0600 From: "James R. Van Artsdalen" User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: =?ISO-8859-2?Q?Edward_Tomasz_Napiera=B3a?= References: <4CF26B15.6090009@jrv.org> <7A3D90B8-EEC0-4FC2-9744-C58379709901@FreeBSD.org> In-Reply-To: <7A3D90B8-EEC0-4FC2-9744-C58379709901@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs Subject: Re: ZFS panic: empty ZFS ACL X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2010 01:08:10 -0000 Edward Tomasz Napiera=B3a wrote: > Could you try the patch below? > > Index: sys/cddl/compat/opensolaris/kern/opensolaris_acl.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/cddl/compat/opensolaris/kern/opensolaris_acl.c (revision 21555= 3) > +++ sys/cddl/compat/opensolaris/kern/opensolaris_acl.c (working copy) > @@ -105,7 +105,10 @@ > struct acl_entry *entry; > const ace_t *ace; > =20 > - KASSERT(nentries >=3D 1, ("empty ZFS ACL")); > + if (nentries < 1) { > + printf("acl_from_aces: empty ZFS ACL; returning EINVAL.= \n"); > + return (EINVAL); > + } > =20 > if (nentries > ACL_MAX_ENTRIES) { > /* > > -- > If you cut off my head, what would I say? Me and my head, or me and my= body? > =20 The patch prevents the panic but EINVAL propagates back up to the application in an undesirable way: kraken:/root# ls -ld /STUFF/fearhome/Backups ls: /STUFF/fearhome/Backups: Invalid argument drwxr-xr-x 9 james james 10 Oct 17 2007 /STUFF/fearhome/Backups kraken:/root#