Re: WARNING at __ftrace_hash_rec_update()

From: Steven Rostedt
Date: Fri Nov 04 2011 - 20:31:40 EST


On Tue, 2011-11-01 at 19:45 +0530, Rabin Vincent wrote:
> On v3.1-7810-g094803e (current linus git), I'm able to trigger the below
> FTRACE_WARN_ON() by running the following sequence of commands.
> DYNAMIC_FTRACE is enabled.
>
> ftrace.c:1384:
> if (FTRACE_WARN_ON((rec->flags & ~FTRACE_FL_MASK) == 0))
> return;
> rec->flags--;
>

Thanks for reporting. Can you try this patch please.

-- Steve


diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 0fcc6ca..9af2ea6 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1210,7 +1210,8 @@ ftrace_hash_move(struct ftrace_ops *ops, int enable,
if (!src->count) {
free_ftrace_hash_rcu(*dst);
rcu_assign_pointer(*dst, EMPTY_HASH);
- return 0;
+ /* still need to update the function records */
+ goto out;
}

/*


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