[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJedcCwuH7eus+bVBvyDJOriPVgSp1UPjvXXjb9szy7C5t5h-A@mail.gmail.com>
Date: Wed, 15 Mar 2023 16:58:45 +0800
From: Zheng Hacker <hackerzheng666@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Zheng Wang <zyytlz.wz@....com>, davem@...emloft.net,
edumazet@...gle.com, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, 1395428693sheep@...il.com,
alex000young@...il.com
Subject: Re: [PATCH net] net: ethernet: fix use after free bug in
ns83820_remove_one due to race condition
Jakub Kicinski <kuba@...nel.org> 于2023年3月15日周三 12:10写道:
>
> On Tue, 14 Mar 2023 09:59:09 +0800 Zheng Hacker wrote:
> > Jakub Kicinski <kuba@...nel.org> 于2023年3月14日周二 07:26写道:
> > > On Thu, 9 Mar 2023 17:42:31 +0800 Zheng Wang wrote:
> > > > + cancel_work_sync(&dev->tq_refill);
> > > > ns83820_disable_interrupts(dev); /* paranoia */
> > > >
> > > > unregister_netdev(ndev);
> > >
> > > Canceling the work before unregister can't work.
> > > Please take a closer look, the work to refill a ring should be
> > > canceled when the ring itself is dismantled.
> >
> > Hi Jakub,
> >
> > Thanks for your review! After seeing code again, I found when handling
> > IRQ request, it will finally call ns83820_irq->ns83820_do_isr->
> > ns83820_rx_kick->schedule_work to start work. So I think we should
> > move the code after free_irq. What do you think?
>
> Sorry, we have over 300 patches which need reviews. I don't have
> the time to help you. Perhaps someone else will.
>
Hi Jakub,
Thanks for your precious and kind reminder. I'll think about it again
and write the next version of patch.
> Please make sure you work on a single networking fix at a time.
> All the patches you posted had the same issues.
Yes, I'll keep that in mind.
Best regards,
Zheng
Powered by blists - more mailing lists