IRQ/nvme_pci_complete_rq: NULL pointer dereference yet again
Keith Busch
keith.busch at intel.com
Mon Apr 9 12:11:10 PDT 2018
On Mon, Apr 09, 2018 at 01:23:54PM -0500, Alex G. wrote:
> On 04/06/2018 05:00 PM, Keith Busch wrote:
> (snip)
> > ---
> > diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
> > index a4bfea52e7d4..16ecbcd76373 100644
> > --- a/drivers/pci/pcie/aer/aerdrv_core.c
> > +++ b/drivers/pci/pcie/aer/aerdrv_core.c
> > @@ -805,8 +805,10 @@ void aer_isr(struct work_struct *work)
> > struct pcie_device *p_device = rpc->rpd;
> > struct aer_err_source uninitialized_var(e_src);
> >
> > + pci_lock_rescan_remove();
> > mutex_lock(&rpc->rpc_mutex);
> > while (get_e_source(rpc, &e_src))
> > aer_isr_one_error(p_device, &e_src);
> > mutex_unlock(&rpc->rpc_mutex);
> > + pci_unlock_rescan_remove();
> > }
> > --
>
> With this patch, I'm not seeing issues without LVM mirrors, but as soon
> as I enable the mirror, we get the
> * use-after-free in swiotlb_unmap_sg_attrs
> * double-free or invalid-free in nvme_pci_complete_rq
>
> Alex
Awesome, thank you for the update. We'll do some more work on the
above fixing the use-after-free in AER handling to make it ready for
consideration.
Still not sure on the nvme double/incorrect completion, but have not
given up yet.
More information about the Linux-nvme
mailing list