From d85c68235ee94ee98b94017996060c4c8c113e31 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 10 Jul 2009 15:24:08 -0700 Subject: [PATCH] procfs - fix incremental reads of /proc/*/rlimit The rlimit code was only properly copying data for all-in-one-go reads, and mishandling incremental reads. Submitted-by: Beket@@irc --- sys/vfs/procfs/procfs_rlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vfs/procfs/procfs_rlimit.c b/sys/vfs/procfs/procfs_rlimit.c index 790cdaa79d..811f499e97 100644 --- a/sys/vfs/procfs/procfs_rlimit.c +++ b/sys/vfs/procfs/procfs_rlimit.c @@ -120,7 +120,7 @@ procfs_dorlimit(struct proc *curp, struct lwp *lp, struct pfsnode *pfs, if (xlen <= 0) error = 0; else - error = uiomove_frombuf(psbuf, ps - psbuf, uio); + error = uiomove_frombuf(psbuf, xlen, uio); return (error); } -- 2.41.0