[RFC PATCH 05/09] robust VM per_cpu module
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: LKML <linux-kernel@xxxxxxxxxxxxxxx>
- Subject: [RFC PATCH 05/09] robust VM per_cpu module
- From: Steven Rostedt <rostedt@xxxxxxxxxxx>
- Date: Wed, 17 May 2006 05:59:28 -0400 (EDT)
- Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Nick Piggin <nickpiggin@xxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, Martin Mares <mj@xxxxxxxxxxxxxxxxxxxxxxxx>, bjornw@xxxxxxxx, schwidefsky@xxxxxxxxxx, benedict.gaster@xxxxxxxxxx, lethal@xxxxxxxxxxxx, Chris Zankel <chris@xxxxxxxxxx>, Marc Gauthier <marc@xxxxxxxxxxxxx>, Joe Taylor <joe@xxxxxxxxxxxxx>, David Mosberger-Tang <davidm@xxxxxxxxxx>, rth@xxxxxxxxxxx, spyro@xxxxxxx, starvik@xxxxxxxx, tony.luck@xxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, ralf@xxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, grundler@xxxxxxxxxxxxxxxx, parisc-linux@xxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxx, linux390@xxxxxxxxxx, davem@xxxxxxxxxxxxx, arnd@xxxxxxxx, kenneth.w.chen@xxxxxxxxx, sam@xxxxxxxxxxxx, clameter@xxxxxxx, kiran@xxxxxxxxxxxx
- In-reply-to: <Pine.LNX.4.58.0605170547490.8408@xxxxxxxxxxxxxxxxxxx>
- References: <Pine.LNX.4.58.0605170547490.8408@xxxxxxxxxxxxxxxxxxx>
This patch performs a check on the return value of percpu_modcopy
for the module load.
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
Index: linux-2.6.16-test/kernel/module.c
===================================================================
--- linux-2.6.16-test.orig/kernel/module.c 2006-05-17 04:32:28.000000000 -0400
+++ linux-2.6.16-test/kernel/module.c 2006-05-17 04:57:53.000000000 -0400
@@ -1819,8 +1819,11 @@ static struct module *load_module(void _
sort_extable(extable, extable + mod->num_exentries);
/* Finally, copy percpu area over. */
- percpu_modcopy(mod->percpu, (void *)sechdrs[pcpuindex].sh_addr,
- sechdrs[pcpuindex].sh_size);
+ err = percpu_modcopy(mod->percpu, (void *)sechdrs[pcpuindex].sh_addr,
+ sechdrs[pcpuindex].sh_size);
+
+ if (err < 0)
+ goto cleanup;
add_kallsyms(mod, sechdrs, symindex, strindex, secstrings);
-
: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]