From: Uladzislau Rezki <urezki@gmail.com>
To: Zqiang <qiang1.zhang@intel.com>
Cc: urezki@gmail.com, paulmck@kernel.org, frederic@kernel.org,
joel@joelfernandes.org, qiang.zhang1211@gmail.com,
rcu@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu/kvfree: Invoke debug_rcu_bhead_unqueue() with check bnode->snap is done
Date: Wed, 5 Apr 2023 16:45:27 +0200 [thread overview]
Message-ID: <ZC2Jh6CaeHHpkWLW@pc636> (raw)
In-Reply-To: <20230405021359.606321-1-qiang1.zhang@intel.com>
On Wed, Apr 05, 2023 at 10:13:59AM +0800, Zqiang wrote:
> This commit make debug_rcu_bhead_unqueue() be invoked with check
> the bnode structure's->snap is done in kvfree_rcu_bulk().
>
> Signed-off-by: Zqiang <qiang1.zhang@intel.com>
> ---
> kernel/rcu/tree.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 3461fc2640b9..17b5d115aec1 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2943,8 +2943,8 @@ kvfree_rcu_bulk(struct kfree_rcu_cpu *krcp,
> unsigned long flags;
> int i;
>
> - debug_rcu_bhead_unqueue(bnode);
> if (!WARN_ON_ONCE(!poll_state_synchronize_rcu_full(&bnode->gp_snap))) {
> + debug_rcu_bhead_unqueue(bnode);
> rcu_lock_acquire(&rcu_callback_map);
> if (idx == 0) { // kmalloc() / kfree().
> trace_rcu_invoke_kfree_bulk_callback(
> --
> 2.32.0
>
Since we leak, looks like correct to me:
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
--
Uladzislau Rezki
next prev parent reply other threads:[~2023-04-05 14:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 2:13 [PATCH] rcu/kvfree: Invoke debug_rcu_bhead_unqueue() with check bnode->snap is done Zqiang
2023-04-05 14:45 ` Uladzislau Rezki [this message]
2023-04-05 19:04 ` Paul E. McKenney
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=ZC2Jh6CaeHHpkWLW@pc636 \
--to=urezki@gmail.com \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=qiang1.zhang@intel.com \
--cc=rcu@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.