lkml.org 
[lkml]   [2022]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2] rcu: Dump memory object info if callback function is invalid
Date


> +static inline void debug_rcu_head_callback(struct rcu_head *rhp)
> +{
> + if (unlikely(!rhp->func))
> + mem_dump_obj(rhp);
> +}
> +

The mm/util.c definition of mem_dump_object() says:
* This function uses pr_cont(), so that the caller is expected to have
* printed out whatever preamble is appropriate.

so this needs to call pr_alert() or pr_err() before that to explain what
is being printed (with no \n), like these:

kernel/rcu/rcutorture.c: pr_alert("mem_dump_obj(%px):", &rhp);
kernel/rcu/rcutorture.c: mem_dump_obj(&rhp);
...
kernel/rcu/tree.c: pr_err("%s(): Double-freed CB %p->%pS()!!! ", __func__, head, head->func);
kernel/rcu/tree.c: mem_dump_obj(head);


\
 
 \ /
  Last update: 2022-11-11 16:51    [W:0.156 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site