Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jul 2010 18:54:57 +0000 (UTC)
From:      Jaakko Heinonen <jh@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: r210453 - stable/8/sys/fs/pseudofs
Message-ID:  <201007241854.o6OIsvsx008681@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jh
Date: Sat Jul 24 18:54:57 2010
New Revision: 210453
URL: http://svn.freebsd.org/changeset/base/210453

Log:
  MFC r202783:
  
  Truncate read request rather than returning EIO if the request is
  larger than MAXPHYS + 1. This fixes a problem with cat(1) when it
  uses a large I/O buffer.

Modified:
  stable/8/sys/fs/pseudofs/pseudofs_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)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c
==============================================================================
--- stable/8/sys/fs/pseudofs/pseudofs_vnops.c	Sat Jul 24 18:53:46 2010	(r210452)
+++ stable/8/sys/fs/pseudofs/pseudofs_vnops.c	Sat Jul 24 18:54:57 2010	(r210453)
@@ -637,10 +637,8 @@ pfs_read(struct vop_read_args *va)
 		error = EINVAL;
 		goto ret;
 	}
-	if (buflen > MAXPHYS + 1) {
-		error = EIO;
-		goto ret;
-	}
+	if (buflen > MAXPHYS + 1)
+		buflen = MAXPHYS + 1;
 
 	sb = sbuf_new(sb, NULL, buflen, 0);
 	if (sb == NULL) {



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