cvs commit: src/sys/ia64/ia64 machdep.c syscall.S
Marcel Moolenaar
marcel at FreeBSD.org
Tue Nov 11 01:25:25 PST 2003
marcel 2003/11/11 01:25:19 PST
FreeBSD src repository
Modified files:
sys/ia64/ia64 machdep.c syscall.S
Log:
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().
Revision Changes Path
1.167 +10 -1 src/sys/ia64/ia64/machdep.c
1.11 +16 -3 src/sys/ia64/ia64/syscall.S
More information about the cvs-src
mailing list