Date: Tue, 9 Jul 2013 14:23:00 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253098 - head/sys/fs/ext2fs Message-ID: <201307091423.r69EN0n5020279@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Tue Jul 9 14:23:00 2013 New Revision: 253098 URL: http://svnweb.freebsd.org/changeset/base/253098 Log: Reinstate the assertion from r253045. UFS r232732 reverted the change as the real problem was to be fixed at the syscall level. Reported by: bde Modified: head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Tue Jul 9 13:52:34 2013 (r253097) +++ head/sys/fs/ext2fs/ext2_vnops.c Tue Jul 9 14:23:00 2013 (r253098) @@ -1598,11 +1598,11 @@ ext2_read(struct vop_read_args *ap) } else if (vp->v_type != VREG && vp->v_type != VDIR) panic("%s: type %d", "ext2_read", vp->v_type); #endif - if (uio->uio_resid < 0 || uio->uio_offset < 0) - return (EINVAL); orig_resid = uio->uio_resid; + KASSERT(orig_resid >= 0, ("ext2_read: uio->uio_resid < 0")); if (orig_resid == 0) return (0); + KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0")); fs = ip->i_e2fs; if (uio->uio_offset < ip->i_size && uio->uio_offset >= fs->e2fs_maxfilesize)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307091423.r69EN0n5020279>