Commit 1b9ee807 authored by David Mosberger's avatar David Mosberger Committed by David Mosberger

ia64: From Linus: Always disable system call restart when invoking a

	signal handler.  Otherwise, a restarted system call that gets
	interrupted before the restart has taken effect by _another_
	signal will potentially restart the wrong system call.
parent 0e777a64
...@@ -559,10 +559,12 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall) ...@@ -559,10 +559,12 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
ka = &current->sighand->action[signr - 1]; ka = &current->sighand->action[signr - 1];
/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
if (restart) { if (restart) {
switch (errno) { switch (errno) {
case ERESTART_RESTARTBLOCK: case ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn = do_no_restart_syscall;
case ERESTARTNOHAND: case ERESTARTNOHAND:
scr->pt.r8 = ERR_CODE(EINTR); scr->pt.r8 = ERR_CODE(EINTR);
/* note: scr->pt.r10 is already -1 */ /* note: scr->pt.r10 is already -1 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment