From: Matthew Dillon Date: Thu, 16 Aug 2012 01:17:43 +0000 (-0700) Subject: kernel - Fix numerous procfs/ptrace issues (3) X-Git-Tag: v3.2.0~384 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/86d81c56e60ae30ad8716761d36de4a3a40f8a57 kernel - Fix numerous procfs/ptrace issues (3) * Add a safety spin-lock around adjustments to p_stops so it hopefully interacts better with the event processing side of things. --- diff --git a/sys/vfs/procfs/procfs_vnops.c b/sys/vfs/procfs/procfs_vnops.c index f3b79bd..8974479 100644 --- a/sys/vfs/procfs/procfs_vnops.c +++ b/sys/vfs/procfs/procfs_vnops.c @@ -302,10 +302,14 @@ procfs_ioctl(struct vop_ioctl_args *ap) switch (ap->a_command) { case PIOCBIS: + spin_lock(&procp->p_spin); procp->p_stops |= *(unsigned int*)ap->a_data; + spin_unlock(&procp->p_spin); break; case PIOCBIC: + spin_lock(&procp->p_spin); procp->p_stops &= ~*(unsigned int*)ap->a_data; + spin_unlock(&procp->p_spin); break; case PIOCSFL: /*