lkml.org 
[lkml]   [2009]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] kmemtrace: Fix up tracer registration.
    Commit ddc1637af217dbd8bc51f30e6d24e84476a869a6
    ("kmemtrace: Print binary output only if 'bin' option is set") ended up
    inverting the error detection logic. register_tracer() returns 0 on
    success, which this change caused to treat as an error, resulting in:

    [ 0.132000] Warning: could not register the kmem tracer

    as well as bailing out of the initcall with an error value. This
    restores the old logic.

    Signed-off-by: Paul Mundt <lethal@linux-sh.org>
    Cc: Li Zefan <lizf@cn.fujitsu.com>
    Cc: Pekka Enberg <penberg@cs.helsinki.fi>
    Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@elte.hu>

    ---

    kernel/trace/kmemtrace.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
    index 81b1645..a91da69 100644
    --- a/kernel/trace/kmemtrace.c
    +++ b/kernel/trace/kmemtrace.c
    @@ -501,7 +501,7 @@ static int __init init_kmem_tracer(void)
    return 1;
    }

    - if (!register_tracer(&kmem_tracer)) {
    + if (register_tracer(&kmem_tracer) != 0) {
    pr_warning("Warning: could not register the kmem tracer\n");
    return 1;
    }

    \
     
     \ /
      Last update: 2009-09-28 09:59    [W:0.050 / U:61.116 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site