[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10b1fec4-d363-fc6b-9dd9-122512be48be@huawei.com>
Date: Mon, 14 Nov 2022 15:05:22 +0800
From: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To: "Elliott, Robert (Servers)" <elliott@....com>,
"Paul E . McKenney" <paulmck@...nel.org>,
Frederic Weisbecker <frederic@...nel.org>,
"Neeraj Upadhyay" <quic_neeraju@...cinc.com>,
Josh Triplett <josh@...htriplett.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Joel Fernandes <joel@...lfernandes.org>,
"rcu@...r.kernel.org" <rcu@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] rcu: Dump memory object info if callback function is
invalid
On 2022/11/11 23:50, Elliott, Robert (Servers) wrote:
>
>
>> +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);
Yes, right, thanks.
>
>
> .
>
--
Regards,
Zhen Lei
Powered by blists - more mailing lists