aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2020-10-16 09:58:10 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-05-01 00:38:30 +0000
commit72e1884f593f9b86c9ea4e74d02449f6678770dd (patch)
tree665bc4fe596a5a74fefa9ab3eb9046f5d29e0706
parent2a8c3e7b22c8d09233c148411a3169ca6a7f364d (diff)
downloadsrc-72e1884f593f9b86c9ea4e74d02449f6678770dd.tar.gz
src-72e1884f593f9b86c9ea4e74d02449f6678770dd.zip
Bump pseudofs size limit from 128kB to 1MB.
PR: 237883 (cherry picked from commit ce764cbd1c725c54966315949fe93eb3994c1b5e)
-rw-r--r--sys/fs/pseudofs/pseudofs_vnops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
index da35f06208fa..6c025547b71b 100644
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -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
*/
@@ -659,8 +661,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) {