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.
This commit is contained in:
John Baldwin 2018-04-24 05:42:10 +00:00
parent 93fc184b82
commit 45726c1dae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332910

View File

@ -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;