summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_lookup.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-11-10 11:46:53 +0000
committerkib <kib@FreeBSD.org>2009-11-10 11:46:53 +0000
commitcd432c18cdf98aaa39b871b643d199d910a1ee8a (patch)
tree917e1b3f029e242c345060d1c391854db34e85ef /sys/kern/vfs_lookup.c
parent3cf53f181e7360f48fecc50a925d46029888af1d (diff)
downloadFreeBSD-src-cd432c18cdf98aaa39b871b643d199d910a1ee8a.zip
FreeBSD-src-cd432c18cdf98aaa39b871b643d199d910a1ee8a.tar.gz
In r198506, kern_sigsuspend() started doing cursig/postsig loop to make
sure that a signal was delivered to the thread before returning from syscall. Signal delivery puts new return frame on the user stack, and modifies trap frame to enter signal handler. As a consequence, syscall return code sets EINTR as error return for signal frame, instead of the syscall return. Also, for ia64, due to different registers layout for those two kind of frames, usermode sigsegfaulted when returned from signal handler. Use newly-introduced cpu_set_syscall_retval(9) to set syscall result, and return EJUSTRETURN from kern_sigsuspend() to prevent syscall return code from modifying this frame [1]. Another issue is that pending SIGCONT might be cancelled by SIGSTOP, causing postsig() not to deliver any catched signal [2]. Modify postsig() to return 1 if signal was posted, and 0 otherwise, and use this in the kern_sigsuspend loop. Proposed by: marcel [1] Noted by: davidxu [2] Reviewed by: marcel, davidxu MFC after: 1 month
Diffstat (limited to 'sys/kern/vfs_lookup.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud