summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-09-30 23:27:21 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 00:39:19 -0700
commit52978be636374c4bfb61220b37fa12f55a071c46 (patch)
tree36444be7bdbc0cdd99d903c0ad87316c93427517 /arch
parent1a2f67b459bb7846d4a15924face63eb2683acc2 (diff)
downloadop-kernel-dev-52978be636374c4bfb61220b37fa12f55a071c46.zip
op-kernel-dev-52978be636374c4bfb61220b37fa12f55a071c46.tar.gz
[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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 8c190ca..96cd023 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);
}
OpenPOWER on IntegriCloud