From owner-svn-src-stable-8@FreeBSD.ORG Sat Apr 16 12:45:09 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EA301065673; Sat, 16 Apr 2011 12:45:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CAFC8FC16; Sat, 16 Apr 2011 12:45:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3GCj9dH005541; Sat, 16 Apr 2011 12:45:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3GCj9F3005539; Sat, 16 Apr 2011 12:45:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104161245.p3GCj9F3005539@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 16 Apr 2011 12:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220717 - stable/8/sys/fs/fdescfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2011 12:45:09 -0000 Author: kib Date: Sat Apr 16 12:45:09 2011 New Revision: 220717 URL: http://svn.freebsd.org/changeset/base/220717 Log: MFC r220506: Implement a workaround for fdescfs to not panic when ncookies is not NULL. PR: kern/156177 Modified: stable/8/sys/fs/fdescfs/fdesc_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- stable/8/sys/fs/fdescfs/fdesc_vnops.c Sat Apr 16 12:43:04 2011 (r220716) +++ stable/8/sys/fs/fdescfs/fdesc_vnops.c Sat Apr 16 12:45:09 2011 (r220717) @@ -500,16 +500,12 @@ fdesc_readdir(ap) struct dirent *dp = &d; int error, i, off, fcnt; - /* - * We don't allow exporting fdesc mounts, and currently local - * requests do not need cookies. - */ - if (ap->a_ncookies) - panic("fdesc_readdir: not hungry"); - if (VTOFDESC(ap->a_vp)->fd_type != Froot) panic("fdesc_readdir: not dir"); + if (ap->a_ncookies != NULL) + *ap->a_ncookies = 0; + off = (int)uio->uio_offset; if (off != uio->uio_offset || off < 0 || (u_int)off % UIO_MX != 0 || uio->uio_resid < UIO_MX)