[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iL=sLeDpPfM8OKbDc7L95p+exPynZNz+tUBUve7eA42Eg@mail.gmail.com>
Date: Thu, 21 Jul 2022 20:34:35 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Taehee Yoo <ap420073@...il.com>
Cc: David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
David Ahern <dsahern@...nel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] net: mld: do not use system_wq in the mld
On Thu, Jul 21, 2022 at 7:53 PM Taehee Yoo <ap420073@...il.com> wrote:
>
> Hi Eric,
> Thank you so much for your review!
>
...
> I think your assumption is right.
> I tested the below scenario, which occurs the real issue.
> THREAD0 THREAD1
> mld_report_work()
> spin_lock_bh()
> if (!mod_delayed_work()) <-- queued
> in6_dev_hold();
> spin_unlock_bh()
> spin_lock_bh()
> schedule_delayed_work() <-- return false, already queued by THREAD1
> spin_unlock_bh()
> return;
> //no in6_dev_put() regardless return value of schedule_delayed_work().
>
> In order to check, I added printk like below.
> if (++cnt >= MLD_MAX_QUEUE) {
>
> rework = true;
>
> if (!schedule_delayed_work(&idev->mc_report_work, 0))
> printk("[TEST]%s %u \n", __func__, __LINE__);
> break;
>
>
> If the TEST log message is printed, work is already queued by other logic.
> So, it indicates a reference count is leaked.
> The result is that I can see log messages only when the reference count
> leak occurs.
> So, although I tested it only for 1 hour, I'm sure that this bug comes
> from missing check a return value of schedule_delayed_work().
>
> As you said, this changelog is not correct.
> system_wq and mld_wq are not related to this issue.
>
> I would like to send a v2 patch after some more tests.
> The v2 patch will change the commit message.
Can you describe what kind of tests you are running ?
Was it a syzbot report ?
Powered by blists - more mailing lists