lkml.org 
[lkml]   [2008]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kprobes: disable preempt for module_text_address()
    Hiroshi Shimamoto wrote:
    >> if (probed_mod) {
    >> - struct module *calling_mod = module_text_address(called_from);
    >> + struct module *calling_mod;
    >> + calling_mod = __module_text_address(called_from);
    >> /*
    >> * We must allow modules to probe themself and in this case
    >> * avoid incrementing the module refcount, so as to allow
    >> * unloading of self probing modules.
    >> */
    >> if (calling_mod && calling_mod != probed_mod) {
    >
    > One question, off topic.
    > If calling_mod is NULL, no try_module_get(), is that OK?

    Good question. Currently, kprobes is called only from kernel modules,
    so calling_mod should be always !NULL.
    However, it should be fixed, because the logic is not correct.

    Thank you,

    --
    Masami Hiramatsu

    Software Engineer
    Hitachi Computer Products (America) Inc.
    Software Solutions Division

    e-mail: mhiramat@redhat.com



    \
     
     \ /
      Last update: 2008-11-06 00:11    [W:0.031 / U:61.948 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site