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.0.3~8 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/f5e3dacfcb9647d13edda3586dd637318a18149c 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: /*