Re: [PATCH] PCI: hotplug: fix null-ptr-dereferencd in cpcihp error path

2021-03-23 Thread Bjorn Helgaas
On Sun, Mar 21, 2021 at 01:51:08AM -0400, Tong Zhang wrote: > There is an issue in the error path, which cpci_thread may remain NULL. > Calling kthread_stop(cpci_thread) will trigger a BUG(). > It is better to check whether the thread is really created and started > before stop it. > > [

[PATCH] PCI: hotplug: fix null-ptr-dereferencd in cpcihp error path

2021-03-20 Thread Tong Zhang
There is an issue in the error path, which cpci_thread may remain NULL. Calling kthread_stop(cpci_thread) will trigger a BUG(). It is better to check whether the thread is really created and started before stop it. [1.292859] BUG: kernel NULL pointer dereference, address: 0028 [