Date: Mon, 17 May 2010 08:15:04 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r208186 - stable/8/sys/fs/procfs Message-ID: <201005170815.o4H8F4AM064269@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon May 17 08:15:04 2010 New Revision: 208186 URL: http://svn.freebsd.org/changeset/base/208186 Log: MFC r207848: The thread_unsuspend() requires both process mutex and process spinlock locked. Postpone the process unlock till the thread_unsuspend() is called. Modified: stable/8/sys/fs/procfs/procfs_ctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/procfs/procfs_ctl.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_ctl.c Mon May 17 08:11:23 2010 (r208185) +++ stable/8/sys/fs/procfs/procfs_ctl.c Mon May 17 08:15:04 2010 (r208186) @@ -236,7 +236,6 @@ out: PROC_LOCK(p); p->p_oppid = 0; p->p_flag &= ~P_WAITED; /* XXX ? */ - PROC_UNLOCK(p); sx_xunlock(&proctree_lock); wakeup(td->td_proc); /* XXX for CTL_WAIT below ? */ @@ -249,9 +248,10 @@ out: */ case PROCFS_CTL_STEP: error = proc_sstep(FIRST_THREAD_IN_PROC(p)); - PROC_UNLOCK(p); - if (error) + if (error) { + PROC_UNLOCK(p); return (error); + } break; /* @@ -260,7 +260,6 @@ out: */ case PROCFS_CTL_RUN: p->p_flag &= ~P_STOPPED_SIG; /* this uses SIGSTOP */ - PROC_UNLOCK(p); break; /* @@ -292,6 +291,7 @@ out: PROC_SLOCK(p); thread_unsuspend(p); /* If it can run, let it do so. */ PROC_SUNLOCK(p); + PROC_UNLOCK(p); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005170815.o4H8F4AM064269>