]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - sys/kern/subr_syscall.c
Move TDB_USERWR check under 'if (traced)'.
authorEdward Tomasz Napierala <trasz@FreeBSD.org>
Sat, 7 Nov 2020 13:09:51 +0000 (13:09 +0000)
committerEdward Tomasz Napierala <trasz@FreeBSD.org>
Sat, 7 Nov 2020 13:09:51 +0000 (13:09 +0000)
commitda45ea6bc6c7c15b4839e7e83ae8810b4c250c33
treedf2c14294264bf9abaf124c350a604e36ac2f341
parent2192cd125f1f6a418812595e0d74ad52f66934ae
Move TDB_USERWR check under 'if (traced)'.

If we hadn't been traced in the first place when syscallenter()
started executing, we can ignore TDB_USERWR.  TDB_USERWR can get set,
sure, but if it does, it's because the debugger raced with the syscall,
and it cannot depend on winning that race.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: EPSRC
Differential Revision: https://reviews.freebsd.org/D26585
sys/kern/subr_syscall.c