svn commit: r332910 - head/sys/mips/mips
John Baldwin
jhb at FreeBSD.org
Tue Apr 24 05:42:11 UTC 2018
Author: jhb
Date: Tue Apr 24 05:42:10 2018
New Revision: 332910
URL: https://svnweb.freebsd.org/changeset/base/332910
Log:
Relock PROC_LOCK before one failure case in ptrace_single_step().
The MIPS ptrace_single_step() unlocks the PROC_LOCK while reading and
writing instructions from userland. One failure case was not reacquiring
the lock before returning.
Modified:
head/sys/mips/mips/pm_machdep.c
Modified: head/sys/mips/mips/pm_machdep.c
==============================================================================
--- head/sys/mips/mips/pm_machdep.c Tue Apr 24 05:33:17 2018 (r332909)
+++ head/sys/mips/mips/pm_machdep.c Tue Apr 24 05:42:10 2018 (r332910)
@@ -260,6 +260,7 @@ ptrace_single_step(struct thread *td)
if (td->td_md.md_ss_addr) {
printf("SS %s (%d): breakpoint already set at %x (va %x)\n",
p->p_comm, p->p_pid, td->td_md.md_ss_addr, va); /* XXX */
+ PROC_LOCK(p);
return (EFAULT);
}
td->td_md.md_ss_addr = va;
More information about the svn-src-all
mailing list