diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2003-05-05 15:12:51 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2003-05-05 15:12:51 +0000 |
| commit | 587ffa4508f56f999fe330a12e89b70e35640e38 (patch) | |
| tree | 9ad6dec1b793092dc34fb8685ed211b3fd0e055e /sys/fs/procfs | |
| parent | d7398f2363ac164d736a7ecf9d3b45f2211d224d (diff) | |
Notes
Diffstat (limited to 'sys/fs/procfs')
| -rw-r--r-- | sys/fs/procfs/procfs_dbregs.c | 5 | ||||
| -rw-r--r-- | sys/fs/procfs/procfs_fpregs.c | 5 | ||||
| -rw-r--r-- | sys/fs/procfs/procfs_regs.c | 7 |
3 files changed, 12 insertions, 5 deletions
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c index 442521c6ac2a..ae6e7943f71b 100644 --- a/sys/fs/procfs/procfs_dbregs.c +++ b/sys/fs/procfs/procfs_dbregs.c @@ -87,8 +87,11 @@ procfs_doprocdbregs(PFS_FILL_ARGS) else /* XXXKSE: */ error = proc_read_dbregs(FIRST_THREAD_IN_PROC(p), &r); - if (error == 0) + if (error == 0) { + PROC_UNLOCK(p); error = uiomove(kv, kl, uio); + PROC_LOCK(p); + } if (error == 0 && uio->uio_rw == UIO_WRITE) { if (!P_SHOULDSTOP(p)) /* XXXKSE should be P_TRACED? */ error = EBUSY; diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c index f1401f37345f..b52f5ee85864 100644 --- a/sys/fs/procfs/procfs_fpregs.c +++ b/sys/fs/procfs/procfs_fpregs.c @@ -81,8 +81,11 @@ procfs_doprocfpregs(PFS_FILL_ARGS) else /* XXXKSE: */ error = proc_read_fpregs(FIRST_THREAD_IN_PROC(p), &r); - if (error == 0) + if (error == 0) { + PROC_UNLOCK(p); error = uiomove(kv, kl, uio); + PROC_LOCK(p); + } if (error == 0 && uio->uio_rw == UIO_WRITE) { if (!P_SHOULDSTOP(p)) error = EBUSY; diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c index 6cefe7ed9440..1bdb58bbe2cd 100644 --- a/sys/fs/procfs/procfs_regs.c +++ b/sys/fs/procfs/procfs_regs.c @@ -76,15 +76,16 @@ procfs_doprocregs(PFS_FILL_ARGS) kl = uio->uio_resid; _PHOLD(p); - PROC_UNLOCK(p); if (kl < 0) error = EINVAL; else /* XXXKSE: */ error = proc_read_regs(FIRST_THREAD_IN_PROC(p), &r); - if (error == 0) + if (error == 0) { + PROC_UNLOCK(p); error = uiomove(kv, kl, uio); - PROC_LOCK(p); + PROC_LOCK(p); + } if (error == 0 && uio->uio_rw == UIO_WRITE) { if (!P_SHOULDSTOP(p)) error = EBUSY; |
