summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/procfs/procfs_dbregs.c4
-rw-r--r--sys/fs/procfs/procfs_regs.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c
index c30f231..d985245 100644
--- a/sys/fs/procfs/procfs_dbregs.c
+++ b/sys/fs/procfs/procfs_dbregs.c
@@ -95,6 +95,9 @@ procfs_doprocdbregs(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) != 0) {
@@ -128,6 +131,5 @@ procfs_doprocdbregs(PFS_FILL_ARGS)
}
PROC_UNLOCK(p);
- uio->uio_offset = 0;
return (error);
}
diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c
index cba2b7b..481c053 100644
--- a/sys/fs/procfs/procfs_regs.c
+++ b/sys/fs/procfs/procfs_regs.c
@@ -89,8 +89,11 @@ procfs_doprocregs(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"));
+ PROC_ASSERT_HELD(p);
if (p_candebug(td, p)) {
PROC_UNLOCK(p);
return (EPERM);
@@ -122,6 +125,5 @@ procfs_doprocregs(PFS_FILL_ARGS)
}
PROC_UNLOCK(p);
- uio->uio_offset = 0;
return (error);
}
OpenPOWER on IntegriCloud