mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
kcmp_pget(): do not accept TIDs
Otherwise pget() might still look up and hold the current process. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
1e01650a78
commit
5b3e5c6ce3
|
@ -2098,7 +2098,8 @@ kcmp_pget(struct thread *td, pid_t pid, struct proc **pp)
|
|||
*pp = td->td_proc;
|
||||
return (0);
|
||||
}
|
||||
error = pget(pid, PGET_CANDEBUG | PGET_NOTWEXIT | PGET_HOLD, pp);
|
||||
error = pget(pid, PGET_NOTID | PGET_CANDEBUG | PGET_NOTWEXIT |
|
||||
PGET_HOLD, pp);
|
||||
MPASS(*pp != td->td_proc);
|
||||
return (error);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue