From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 17:19:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61E801065674; Fri, 9 Mar 2012 17:19:51 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1C18FC0A; Fri, 9 Mar 2012 17:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29HJouY017101; Fri, 9 Mar 2012 17:19:50 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29HJoXH017099; Fri, 9 Mar 2012 17:19:50 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201203091719.q29HJoXH017099@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Mar 2012 17:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232732 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 17:19:51 -0000 Author: pho Date: Fri Mar 9 17:19:50 2012 New Revision: 232732 URL: http://svn.freebsd.org/changeset/base/232732 Log: Revert r232692 as the correct place to fix this is at the syscall level. Modified: head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Fri Mar 9 17:13:08 2012 (r232731) +++ head/sys/ufs/ffs/ffs_vnops.c Fri Mar 9 17:19:50 2012 (r232732) @@ -464,11 +464,11 @@ ffs_read(ap) } else if (vp->v_type != VREG && vp->v_type != VDIR) panic("ffs_read: type %d", vp->v_type); #endif - if (uio->uio_resid < 0 || uio->uio_offset < 0) - return (EINVAL); orig_resid = uio->uio_resid; + KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); if (orig_resid == 0) return (0); + KASSERT(uio->uio_offset >= 0, ("ffs_read: uio->uio_offset < 0")); fs = ip->i_fs; if (uio->uio_offset < ip->i_size && uio->uio_offset >= fs->fs_maxfilesize)