diff options
author | marcel <marcel@FreeBSD.org> | 2003-11-11 09:25:19 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-11-11 09:25:19 +0000 |
commit | b097722b0b8b7526323295c61ff6c1b1c4d83b58 (patch) | |
tree | 780a1f1ae66de0cbf22ff475770ec55f1ffe96ab /sys/netgraph/ng_sample.h | |
parent | ac83b0ec2b2285a6a30ba8875aafe4ed4d5fd352 (diff) | |
download | FreeBSD-src-b097722b0b8b7526323295c61ff6c1b1c4d83b58.zip FreeBSD-src-b097722b0b8b7526323295c61ff6c1b1c4d83b58.tar.gz |
Fix a nasty bug that got exposed when the sendsig() and sigreturn()
functions switched to using {g|s}et_mcontext(). The problem is that
sigreturn(), being a syscall, can be given an async. context (i.e.
one corresponding to an interrupt or trap). When this happens, we
try to return to user mode via epc_syscall_return with a trapframe
that can only be used to return to user mode via exception_restore.
To fix this, we check the frame's flags immediately prior to
epc_syscall_return and branch to exception_restore for non-syscall
frames. Modify the assertion in set_mcontext() to check that if
there's a mismatch, it's because of sigreturn().
Diffstat (limited to 'sys/netgraph/ng_sample.h')
0 files changed, 0 insertions, 0 deletions