From c886aa7cdac6ad11a33695d20cda722e66ed028b Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Tue, 8 May 2007 00:24:58 -0700 Subject: [PATCH] --- yaml --- r: 54562 b: refs/heads/master c: 6d4f9c55002544bac1c99d0bab46c89319ab876e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/module.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3b9955456bda..9cd4651e09af 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fe08a9d4982d9618ec25760ea715c46fe051e508 +refs/heads/master: 6d4f9c55002544bac1c99d0bab46c89319ab876e diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index 1eb8ca565ba0..9bdbd1217a6f 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -310,14 +310,14 @@ static int split_block(unsigned int i, unsigned short size) { /* Reallocation required? */ if (pcpu_num_used + 1 > pcpu_num_allocated) { - int *new = kmalloc(sizeof(new[0]) * pcpu_num_allocated*2, - GFP_KERNEL); + int *new; + + new = krealloc(pcpu_size, sizeof(new[0])*pcpu_num_allocated*2, + GFP_KERNEL); if (!new) return 0; - memcpy(new, pcpu_size, sizeof(new[0])*pcpu_num_allocated); pcpu_num_allocated *= 2; - kfree(pcpu_size); pcpu_size = new; }