Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Oct 2020 09:58:11 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r366748 - head/sys/fs/pseudofs
Message-ID:  <202010160958.09G9wBIq018387@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Fri Oct 16 09:58:10 2020
New Revision: 366748
URL: https://svnweb.freebsd.org/changeset/base/366748

Log:
  Bump pseudofs size limit from 128kB to 1MB.  The old limit could result
  in process' memory maps being truncated.
  
  PR:		237883
  Submitted by:	dchagin
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D20575

Modified:
  head/sys/fs/pseudofs/pseudofs_vnops.c

Modified: head/sys/fs/pseudofs/pseudofs_vnops.c
==============================================================================
--- head/sys/fs/pseudofs/pseudofs_vnops.c	Fri Oct 16 08:56:20 2020	(r366747)
+++ head/sys/fs/pseudofs/pseudofs_vnops.c	Fri Oct 16 09:58:10 2020	(r366748)
@@ -68,6 +68,8 @@ __FBSDID("$FreeBSD$");
 	KASSERT((pn)->pn_type == pfstype_symlink,			\
 	    ("%s(): VLNK vnode refers to non-link pfs_node", __func__))
 
+#define	PFS_MAXBUFSIZ		1024 * 1024
+
 /*
  * Returns the fileno, adjusted for target pid
  */
@@ -677,8 +679,8 @@ pfs_read(struct vop_read_args *va)
 		goto ret;
 	}
 	buflen = uio->uio_offset + uio->uio_resid;
-	if (buflen > MAXPHYS)
-		buflen = MAXPHYS;
+	if (buflen > PFS_MAXBUFSIZ)
+		buflen = PFS_MAXBUFSIZ;
 
 	sb = sbuf_new(sb, NULL, buflen + 1, 0);
 	if (sb == NULL) {



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