aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/process.c')
-rw-r--r--arch/i386/kernel/process.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 8c190ca7ae44..96cd0232e1e0 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -425,13 +425,12 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
425 425
426 tsk = current; 426 tsk = current;
427 if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { 427 if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) {
428 p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); 428 p->thread.io_bitmap_ptr = kmemdup(tsk->thread.io_bitmap_ptr,
429 IO_BITMAP_BYTES, GFP_KERNEL);
429 if (!p->thread.io_bitmap_ptr) { 430 if (!p->thread.io_bitmap_ptr) {
430 p->thread.io_bitmap_max = 0; 431 p->thread.io_bitmap_max = 0;
431 return -ENOMEM; 432 return -ENOMEM;
432 } 433 }
433 memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr,
434 IO_BITMAP_BYTES);
435 set_tsk_thread_flag(p, TIF_IO_BITMAP); 434 set_tsk_thread_flag(p, TIF_IO_BITMAP);
436 } 435 }
437 436