diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-09-30 23:27:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 00:39:19 -0700 |
commit | 52978be636374c4bfb61220b37fa12f55a071c46 (patch) | |
tree | 36444be7bdbc0cdd99d903c0ad87316c93427517 /arch/i386 | |
parent | 1a2f67b459bb7846d4a15924face63eb2683acc2 (diff) | |
download | linux-52978be636374c4bfb61220b37fa12f55a071c46.tar.gz linux-52978be636374c4bfb61220b37fa12f55a071c46.tar.bz2 linux-52978be636374c4bfb61220b37fa12f55a071c46.zip |
[PATCH] kmemdup: some users
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/process.c | 5 |
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, tsk = current; if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { - p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); + p->thread.io_bitmap_ptr = kmemdup(tsk->thread.io_bitmap_ptr, + IO_BITMAP_BYTES, GFP_KERNEL); if (!p->thread.io_bitmap_ptr) { p->thread.io_bitmap_max = 0; return -ENOMEM; } - memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr, - IO_BITMAP_BYTES); set_tsk_thread_flag(p, TIF_IO_BITMAP); } |