Commit 492d6ea7 authored by Linus Torvalds's avatar Linus Torvalds

x86-64: fix preempt race in exit_thread

This fixes a (very very small) preempt race window when we
invalidate the IO permission bitmap on process exit.
parent 037ebff3
......@@ -256,10 +256,11 @@ void exit_thread(void)
{
struct task_struct *me = current;
if (me->thread.io_bitmap_ptr) {
struct tss_struct *tss = init_tss + get_cpu();
kfree(me->thread.io_bitmap_ptr);
me->thread.io_bitmap_ptr = NULL;
(init_tss + smp_processor_id())->io_bitmap_base =
INVALID_IO_BITMAP_OFFSET;
tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
put_cpu();
}
}
......
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