netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org,
	syzbot+b47bc4f247856fb4d9e1@syzkaller.appspotmail.com,
	vladbu@mellanox.com, jhs@mojatatu.com, jiri@resnulli.us
Subject: Re: [Patch net] net_sched: check error pointer in tcf_dump_walker()
Date: Sun, 04 Oct 2020 14:54:53 -0700 (PDT)	[thread overview]
Message-ID: <20201004.145453.1397904175583154013.davem@davemloft.net> (raw)
In-Reply-To: <20201002191334.14135-1-xiyou.wangcong@gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Fri,  2 Oct 2020 12:13:34 -0700

> Although we take RTNL on dump path, it is possible to
> skip RTNL on insertion path. So the following race condition
> is possible:
> 
> rtnl_lock()		// no rtnl lock
> 			mutex_lock(&idrinfo->lock);
> 			// insert ERR_PTR(-EBUSY)
> 			mutex_unlock(&idrinfo->lock);
> tc_dump_action()
> rtnl_unlock()
> 
> So we have to skip those temporary -EBUSY entries on dump path
> too.
> 
> Reported-and-tested-by: syzbot+b47bc4f247856fb4d9e1@syzkaller.appspotmail.com
> Fixes: 0fedc63fadf0 ("net_sched: commit action insertions together")
> Cc: Vlad Buslov <vladbu@mellanox.com>
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: Jiri Pirko <jiri@resnulli.us>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Applied and queued up for -stable.

      reply	other threads:[~2020-10-04 21:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 19:13 [Patch net] net_sched: check error pointer in tcf_dump_walker() Cong Wang
2020-10-04 21:54 ` David Miller [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=20201004.145453.1397904175583154013.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+b47bc4f247856fb4d9e1@syzkaller.appspotmail.com \
    --cc=vladbu@mellanox.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;
as well as URLs for NNTP newsgroup(s).