[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMhUBj=FKcox+EkFtJm=LVWyBwDHd1SSQLwnKbFc6Nu1t0uUYA@mail.gmail.com>
Date: Mon, 5 Jul 2021 13:13:42 +0800
From: Zheyu Ma <zheyuma97@...il.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: scott@...teful.org, Bjorn Helgaas <bhelgaas@...gle.com>,
linux-pci@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Tong Zhang <ztong0001@...il.com>
Subject: Re: [PATCH] PCI: hotplug: set 'thread_finished' flag to be true by default
On Fri, Jul 2, 2021 at 6:34 AM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> [+cc Tong]
>
> On Thu, Jun 10, 2021 at 03:02:41AM +0000, Zheyu Ma wrote:
> > In the process of probing the driver 'cpcihp_zt5550', function
> > 'pci_get_device' may fail, at this time 'cpci_hp_unregister_controller'
> > will be called. Since the default value of 'thread_finished' is 0,
> > 'cpci_stop_thread' will be executed, but at this time 'cpci_thread' has
> > not been allocated, which leads to a null pointer dereference.
>
> This looks like the same problem Tong reported here:
>
> https://lore.kernel.org/r/20210321055109.322496-1-ztong0001@gmail.com
>
> I responded to Tong in that thread, and my response to this patch is
> basically the same: I think "thread_finished" is a hack and we can do
> better.
OK, I will reconsider the patch and send the next version to you.
> > Fix this by set 'thread_finished' to be true by default.
> >
> > This log reveals it:
>
> It's good to have the essential details from the log, but most of this
> is not relevant to the problem and should be omitted.
Thanks for your advice, I will delete it in the next patch.
Regards,
Zheyu Ma
Powered by blists - more mailing lists