[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68687fbb-d433-0f7a-9a3b-59f497ce6563@gmail.com>
Date: Sat, 8 May 2021 17:22:21 +0900
From: Taehee Yoo <ap420073@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Cong Wang <cong.wang@...edance.com>,
syzbot <syzbot+7d941e89dd48bcf42573@...kaller.appspotmail.com>
Subject: Re: [Patch net] rtnetlink: use rwsem to protect rtnl_af_ops list
On 5/7/21 6:30 AM, Cong Wang wrote:
> On Thu, May 6, 2021 at 5:26 AM Taehee Yoo <ap420073@...il.com> wrote:
>>
>> On 5/6/21 8:36 AM, Cong Wang wrote:
>> > From: Cong Wang <cong.wang@...edance.com>
>> >
>>
>> Hi Cong,
>> Thank you so much for fixing it!
>>
>> > We use RTNL lock and RCU read lock to protect the global
>> > list rtnl_af_ops, however, this forces the af_ops readers
>> > being in atomic context while iterating this list,
>> > particularly af_ops->set_link_af(). This was not a problem
>> > until we begin to take mutex lock down the path in
>> > __ipv6_dev_mc_dec().
>> >
>> > Convert RTNL+RCU to rwsemaphore, so that we can block on
>> > the reader side while still allowing parallel readers.
>> >
>> > Reported-and-tested-by:
>> syzbot+7d941e89dd48bcf42573@...kaller.appspotmail.com
>> > Fixes: 63ed8de4be81 ("mld: add mc_lock for protecting per-interface
>> mld data")
>> > Cc: Taehee Yoo <ap420073@...il.com>
>> > Signed-off-by: Cong Wang <cong.wang@...edance.com>
>>
>> I have been testing this patch and I found a warning
>
> Ah, good catch! I clearly missed that code path.
>
> Can you help test the attached patch? syzbot is happy with it at least,
> my CI bot is down so I can't run selftests for now.
>
Hi Cong,
I have tested the attached patch with the syzbot reproducer and my own
reproducer.
I couldn't find any problems such as warnings and other splats.
Thanks a lot!
Taehee
Powered by blists - more mailing lists