Use the 'traced' variable instead of comparing p->p_flag again.
There's no call to ptracestop() before that, so the 'traced'
variable is still up to date.
Details
Details
- Reviewers
kib - Commits
- rS366250: Use the 'traced' variable instead of comparing p->p_flag again.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I believe the idea of recheck is because potentially there is a large time gap between first and second use of the flag. For instance, we fetch syscall args in between, which might access user memory, which might fault and cause page in.
Also I do not see how absence of ptracestop() before second use changes anything.
Comment Actions
Yeah, my point about ptracestop would apply more to eg registers being updated by the debugger, not to the fact of being debugged or not.