Date: Fri, 3 Dec 2010 21:52:01 +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: r216160 - stable/8/sys/fs/procfs Message-ID: <201012032152.oB3Lq1bh035126@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Dec 3 21:52:01 2010 New Revision: 216160 URL: http://svn.freebsd.org/changeset/base/216160 Log: MFC r216120: For /proc/<pid>/{regs,fpregs} read access, require the thread to be in stopped state. Otherwise, return EBUSY as is done for write case. Approved by: re (bz) Modified: stable/8/sys/fs/procfs/procfs_fpregs.c stable/8/sys/fs/procfs/procfs_regs.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) Modified: stable/8/sys/fs/procfs/procfs_fpregs.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_fpregs.c Fri Dec 3 21:06:30 2010 (r216159) +++ stable/8/sys/fs/procfs/procfs_fpregs.c Fri Dec 3 21:52:01 2010 (r216160) @@ -97,6 +97,10 @@ procfs_doprocfpregs(PFS_FILL_ARGS) PROC_UNLOCK(p); return (EPERM); } + if (!P_SHOULDSTOP(p)) { + PROC_UNLOCK(p); + return (EBUSY); + } /* XXXKSE: */ td2 = FIRST_THREAD_IN_PROC(p); Modified: stable/8/sys/fs/procfs/procfs_regs.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_regs.c Fri Dec 3 21:06:30 2010 (r216159) +++ stable/8/sys/fs/procfs/procfs_regs.c Fri Dec 3 21:52:01 2010 (r216160) @@ -97,6 +97,10 @@ procfs_doprocregs(PFS_FILL_ARGS) PROC_UNLOCK(p); return (EPERM); } + if (!P_SHOULDSTOP(p)) { + PROC_UNLOCK(p); + return (EBUSY); + } /* XXXKSE: */ td2 = FIRST_THREAD_IN_PROC(p);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012032152.oB3Lq1bh035126>