diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-10-01 08:27:21 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 09:39:19 +0200 |
commit | 52978be636374c4bfb61220b37fa12f55a071c46 (patch) | |
tree | 36444be7bdbc0cdd99d903c0ad87316c93427517 /arch | |
parent | [PATCH] kmemdup: introduce (diff) | |
download | linux-52978be636374c4bfb61220b37fa12f55a071c46.tar.xz 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')
-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); } |