Fix a bug in linprocfs and hold lwps to prevent a race condition.
authorSimon Schubert <corecode@dragonflybsd.org>
Sat, 25 Aug 2007 23:27:02 +0000 (23:27 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Sat, 25 Aug 2007 23:27:02 +0000 (23:27 +0000)
commit9d0447413ec7291011056d7ab05a8e73a19b6997
tree022df6b4ce8bc1ae7a6b80bfde8a15cd40c987a0
parentc499d304add92ea2c2d058b0e0287b49434e76fe
Fix a bug in linprocfs and hold lwps to prevent a race condition.

Linprocfs rolls its own prototype for procfs_domem.  The function was
changed to take a struct lwp *, but neither the private prototype, nor
the procfs_domem call were changed accordingly.  As a result any access
to the linprocfs process memory file resulted in a panic.

Procfs and linprocs perform potentially blocking calls, so HOLD and
RELE the lwps so that they can't be destroyed while procfs is blocked.
sys/emulation/linux/i386/linprocfs/linprocfs_subr.c
sys/vfs/procfs/procfs_subr.c