Skip to content

Commit b8a4209

Browse files
Al Virorichardweinberger
authored andcommitted
um: pull interrupt_end() into userspace()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 1bfa231 commit b8a4209

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎arch/um/kernel/process.c‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,10 @@ void new_thread_handler(void)
151151
* 0 if it just exits
152152
*/
153153
n = run_kernel_thread(fn, arg, &current->thread.exec_buf);
154-
if (n == 1) {
155-
/* Handle any immediate reschedules or signals */
156-
interrupt_end();
154+
if (n == 1)
157155
userspace(&current->thread.regs.regs);
158-
}
159-
else do_exit(0);
156+
else
157+
do_exit(0);
160158
}
161159

162160
/* Called magically, see new_thread_handler above */
@@ -175,9 +173,6 @@ void fork_handler(void)
175173

176174
current->thread.prev_sched = NULL;
177175

178-
/* Handle any immediate reschedules or signals */
179-
interrupt_end();
180-
181176
userspace(&current->thread.regs.regs);
182177
}
183178

‎arch/um/os-Linux/skas/process.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@ void userspace(struct uml_pt_regs *regs)
347347
/* To prevent races if using_sysemu changes under us.*/
348348
int local_using_sysemu;
349349

350+
/* Handle any immediate reschedules or signals */
351+
interrupt_end();
352+
350353
if (getitimer(ITIMER_VIRTUAL, &timer))
351354
printk(UM_KERN_ERR "Failed to get itimer, errno = %d\n", errno);
352355
nsecs = timer.it_value.tv_sec * UM_NSEC_PER_SEC +

0 commit comments

Comments
 (0)