From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Voon Weifeng <weifeng.voon@intel.com>,
Vladimir Oltean <olteanv@gmail.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net 3/3] net/sched: taprio: dereference oper and admin sched under RCU in taprio_destroy
Date: Wed, 14 Sep 2022 21:53:58 +0000 [thread overview]
Message-ID: <20220914215357.i7kvrnuczrltdsoj@skbuf> (raw)
In-Reply-To: <20220914143439.1544363-4-vladimir.oltean@nxp.com>
On Wed, Sep 14, 2022 at 05:34:39PM +0300, Vladimir Oltean wrote:
> - if (q->oper_sched)
> - call_rcu(&q->oper_sched->rcu, taprio_free_sched_cb);
> + rcu_read_lock();
> +
> + oper = rcu_dereference(q->oper_sched);
> + admin = rcu_dereference(q->admin_sched);
> +
> + if (oper)
> + call_rcu(&oper->rcu, taprio_free_sched_cb);
>
> - if (q->admin_sched)
> - call_rcu(&q->admin_sched->rcu, taprio_free_sched_cb);
> + if (admin)
> + call_rcu(&admin->rcu, taprio_free_sched_cb);
> +
> + rcu_read_unlock();
> }
I decided to code up this patch at the last minute, since the sparse
warning was bugging me. But after more testing (including with lockdep,
which says absolutely nothing), I notice some RCU stalls after this
patch. It looks like call_rcu() really doesn't like to be called under
rcu_read_lock(). Please discard this patch set from patchwork, I'll
resend when things will work properly.
prev parent reply other threads:[~2022-09-14 21:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 14:34 [PATCH net 0/3] Fixes for tc-taprio software mode Vladimir Oltean
2022-09-14 14:34 ` [PATCH net 1/3] net/sched: taprio: avoid disabling offload when it was never enabled Vladimir Oltean
2022-09-14 14:34 ` [PATCH net 2/3] net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo child qdiscs Vladimir Oltean
2022-09-14 14:34 ` [PATCH net 3/3] net/sched: taprio: dereference oper and admin sched under RCU in taprio_destroy Vladimir Oltean
2022-09-14 21:53 ` Vladimir Oltean [this message]
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=20220914215357.i7kvrnuczrltdsoj@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=vinicius.gomes@intel.com \
--cc=weifeng.voon@intel.com \
--cc=xiyou.wangcong@gmail.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