lkml.org 
[lkml]   [2006]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[RFC PATCH 05/09] robust VM per_cpu module
    This patch performs a check on the return value of percpu_modcopy
    for the module load.

    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

    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);

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-05-17 12:02    [W:2.721 / U:0.416 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site