[PATCH] Tracepoints fix reentrancy - Kernel

This is a discussion on [PATCH] Tracepoints fix reentrancy - Kernel ; The tracepoints had the same problem markers did have wrt reentrancy. Apply a similar fix using a rcu_barrier after each tracepoint mutex lock. Signed-off-by: Mathieu Desnoyers CC: Ingo Molnar CC: "Frank Ch. Eigler" CC: Lai Jiangshan --- kernel/tracepoint.c | 4 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH] Tracepoints fix reentrancy

  1. [PATCH] Tracepoints fix reentrancy

    The tracepoints had the same problem markers did have wrt reentrancy. Apply a
    similar fix using a rcu_barrier after each tracepoint mutex lock.

    Signed-off-by: Mathieu Desnoyers
    CC: Ingo Molnar
    CC: "Frank Ch. Eigler"
    CC: Lai Jiangshan
    ---
    kernel/tracepoint.c | 4 ++++
    1 file changed, 4 insertions(+)

    Index: linux-2.6-lttng/kernel/tracepoint.c
    ================================================== =================
    --- linux-2.6-lttng.orig/kernel/tracepoint.c 2008-09-30 01:38:39.000000000 -0400
    +++ linux-2.6-lttng/kernel/tracepoint.c 2008-09-30 01:39:56.000000000 -0400
    @@ -361,6 +361,8 @@ int tracepoint_probe_register(const char
    mutex_lock(&tracepoints_mutex);
    entry = get_tracepoint(name);
    WARN_ON(!entry);
    + if (entry->rcu_pending)
    + rcu_barrier_sched();
    tracepoint_entry_free_old(entry, old);
    end:
    mutex_unlock(&tracepoints_mutex);
    @@ -397,6 +399,8 @@ int tracepoint_probe_unregister(const ch
    entry = get_tracepoint(name);
    if (!entry)
    goto end;
    + if (entry->rcu_pending)
    + rcu_barrier_sched();
    tracepoint_entry_free_old(entry, old);
    remove_tracepoint(name); /* Ignore busy error message */
    ret = 0;
    --
    Mathieu Desnoyers
    OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
    --
    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/

  2. Re: [PATCH] Tracepoints fix reentrancy


    * Mathieu Desnoyers wrote:

    > The tracepoints had the same problem markers did have wrt reentrancy. Apply a
    > similar fix using a rcu_barrier after each tracepoint mutex lock.
    >
    > Signed-off-by: Mathieu Desnoyers
    > CC: Ingo Molnar
    > CC: "Frank Ch. Eigler"
    > CC: Lai Jiangshan


    applied to tip/tracing/ftrace, thanks Mathieu!

    Ingo
    --
    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/

+ Reply to Thread