All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Buslov <vlad@buslov.dev>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
	netdev@vger.kernel.org,
	syzbot+80e32b5d1f9923f8ace6@syzkaller.appspotmail.com,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Vlad Buslov <vladbu@mellanox.com>, Jiri Pirko <jiri@resnulli.us>
Subject: Re: [Patch net] act_ife: load meta modules before tcf_idr_check_alloc()
Date: Mon, 07 Sep 2020 15:13:19 +0300	[thread overview]
Message-ID: <877dt5bx9c.fsf@buslov.dev> (raw)
In-Reply-To: <20200904221419.59ba1125@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>


On Sat 05 Sep 2020 at 08:14, Jakub Kicinski <kuba@kernel.org> wrote:
> On Thu,  3 Sep 2020 19:10:11 -0700 Cong Wang wrote:
>> The following deadlock scenario is triggered by syzbot:
>> 
>> Thread A:				Thread B:
>> tcf_idr_check_alloc()
>> ...
>> populate_metalist()
>>   rtnl_unlock()
>> 					rtnl_lock()
>> 					...
>>   request_module()			tcf_idr_check_alloc()
>>   rtnl_lock()
>> 
>> At this point, thread A is waiting for thread B to release RTNL
>> lock, while thread B is waiting for thread A to commit the IDR
>> change with tcf_idr_insert() later.
>> 
>> Break this deadlock situation by preloading ife modules earlier,
>> before tcf_idr_check_alloc(), this is fine because we only need
>> to load modules we need potentially.
>> 
>> Reported-and-tested-by: syzbot+80e32b5d1f9923f8ace6@syzkaller.appspotmail.com
>> Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action")
>> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
>> Cc: Vlad Buslov <vladbu@mellanox.com>
>
> Vlad, it'd have been nice to see your review tag here.

Reviewed. Sorry for the delay.

>
>> Cc: Jiri Pirko <jiri@resnulli.us>
>> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
>
> LGTM, applied and queued for stable, thank you Cong!


  reply	other threads:[~2020-09-07 17:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04  2:10 [Patch net] act_ife: load meta modules before tcf_idr_check_alloc() Cong Wang
2020-09-05  5:14 ` Jakub Kicinski
2020-09-07 12:13   ` Vlad Buslov [this message]
2020-09-07 12:12 ` Vlad Buslov

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=877dt5bx9c.fsf@buslov.dev \
    --to=vlad@buslov.dev \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+80e32b5d1f9923f8ace6@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 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.