Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Mark Bloch <mbloch@nvidia.com>
Cc: Ido Schimmel <idosch@idosch.org>, Vlad Buslov <vladbu@nvidia.com>,
	netdev@vger.kernel.org, Cong Wang <cong.wang@bytedance.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH RESEND net-next] net_sched: refactor TC action init API
Date: Mon, 9 Aug 2021 12:59:18 -0700	[thread overview]
Message-ID: <CAM_iQpWntEBV3msNct=vH=SsypBLco1epGRA0ywF1g-5yXezDg@mail.gmail.com> (raw)
In-Reply-To: <bf87ea8b-5650-6b4d-1968-0eec83b7185d@nvidia.com>

On Sun, Aug 8, 2021 at 8:01 AM Mark Bloch <mbloch@nvidia.com> wrote:
> Hi Ido,
>
> We hit the same issue, I have the bellow patch and it solved the issue for us:
>
> From e4f9b7f0b067bf17fd0f17d6e2b912d4f348718b Mon Sep 17 00:00:00 2001
> From: Mark Bloch <mbloch@nvidia.com>
> Date: Sun, 8 Aug 2021 13:23:08 +0000
> Subject: [PATCH] net/sched: cls_api, reset flags on replay
>
> tc_new_tfilter() can replay a request if it got EAGAIN. The cited commit
> didn't account for this when it converted TC action ->init() API
> to use flags instead of parameters. This can lead to passing stale flags
> down the call chain which results in trying to lock rtnl when it's
> already locked, deadlocking the entire system.
>
> Fix by making sure to reset flags on each replay.

I think this is the right fix. I clearly missed the replay case.

Acked-by: Cong Wang <cong.wang@bytedance.com>

Thanks for catching it!

      parent reply	other threads:[~2021-08-09 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 23:12 [PATCH RESEND net-next] net_sched: refactor TC action init API Cong Wang
2021-08-02  9:30 ` patchwork-bot+netdevbpf
2021-08-08 14:55 ` Ido Schimmel
2021-08-08 15:00   ` Mark Bloch
2021-08-08 15:10     ` Ido Schimmel
2021-08-09 19:59     ` Cong Wang [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='CAM_iQpWntEBV3msNct=vH=SsypBLco1epGRA0ywF1g-5yXezDg@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=cong.wang@bytedance.com \
    --cc=idosch@idosch.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=vladbu@nvidia.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;
as well as URLs for NNTP newsgroup(s).