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
This commit is contained in:
parent
66cd74a611
commit
302762c344
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user