diff options
author | des <des@FreeBSD.org> | 2007-04-15 13:29:36 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2007-04-15 13:29:36 +0000 |
commit | 7b0adac1da5b026764791ce21845881f684ffd04 (patch) | |
tree | d55d01c13d8598f8ae10e37ee02a711a3511f561 /sys/fs | |
parent | 5fa10252a885e480eb714df227ec05c73b35b0f2 (diff) | |
download | FreeBSD-src-7b0adac1da5b026764791ce21845881f684ffd04.zip FreeBSD-src-7b0adac1da5b026764791ce21845881f684ffd04.tar.gz |
Fix the same bug as in procfs_doproc{,db}regs(): check that uio_offset is
0 upon entry, and don't reset it before returning.
MFC after: 3 weeks
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/procfs/procfs_fpregs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c index cb9797b..25412d8 100644 --- a/sys/fs/procfs/procfs_fpregs.c +++ b/sys/fs/procfs/procfs_fpregs.c @@ -89,6 +89,9 @@ procfs_doprocfpregs(PFS_FILL_ARGS) int wrap32 = 0; #endif + if (uio->uio_offset != 0) + return (0); + PROC_LOCK(p); KASSERT(p->p_lock > 0, ("proc not held")); if (p_candebug(td, p)) { @@ -122,6 +125,5 @@ procfs_doprocfpregs(PFS_FILL_ARGS) } PROC_UNLOCK(p); - uio->uio_offset = 0; return (error); } |