mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Elliott, Robert (Servers)" <elliott@hpe.com>
To: Zhen Lei <thunder.leizhen@huawei.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	"Neeraj Upadhyay" <quic_neeraju@quicinc.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	"rcu@vger.kernel.org" <rcu@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] rcu: Dump memory object info if callback function is invalid
Date: Fri, 11 Nov 2022 15:50:34 +0000	[thread overview]
Message-ID: <MW5PR84MB1842F925447B4BD175CF23C9AB009@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20221111102822.224-1-thunder.leizhen@huawei.com>



> +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);



  parent reply	other threads:[~2022-11-11 15:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 10:28 Zhen Lei
2022-11-11 11:54 ` Zhang, Qiang1
2022-11-11 12:34   ` Leizhen (ThunderTown)
2022-11-11 13:05     ` Zhang, Qiang1
2022-11-11 18:42       ` Paul E. McKenney
2022-11-12  2:32         ` Leizhen (ThunderTown)
2022-11-12  2:39           ` Leizhen (ThunderTown)
2022-11-12  6:09             ` Paul E. McKenney
2022-11-12  6:08           ` Paul E. McKenney
2022-11-14  7:18             ` Leizhen (ThunderTown)
2022-11-14 16:06               ` Paul E. McKenney
2022-11-16 14:43                 ` Leizhen (ThunderTown)
2022-11-16 19:57                   ` Paul E. McKenney
2022-11-17  0:09                     ` Zhang, Qiang1
2022-11-14 18:22         ` Uladzislau Rezki
2022-11-17  1:29           ` Leizhen (ThunderTown)
2022-11-11 15:50 ` Elliott, Robert (Servers) [this message]
2022-11-14  7:05   ` Leizhen (ThunderTown)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW5PR84MB1842F925447B4BD175CF23C9AB009@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM \
    --to=elliott@hpe.com \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=thunder.leizhen@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®