Re: [PATCH] pci: fix next_ari_fn scan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 17 Jan 2010 14:01:41 -0700
Matthew Wilcox <matthew@xxxxxx> wrote:

> On Fri, Jan 15, 2010 at 10:24:51AM -0800, Jesse Barnes wrote:
> > Any update on this one Yinghai or Matthew?  I agree with Matthew's
> > cleanup, the no dev check should probably be in scan_slot rather
> > than each potential callee.
> 
> Here's what I came up with.  I decided to put the check in both to be
> robust against the case where the ARI capability is incorrect and
> tells us about a device that doesn't exist.
> 
> ---
> 
> Make pci_scan_slot more robust
> 
> Yinghai pointed out that the new pci_scan_slot() crashes when called
> on an ARI-capable slot that is empty.  Fix this by exiting early from
> pci_scan_slot if there is no device in the slot.
> 
> Also make next_ari_func() robust against devices not existing in case
> the ARI capability is corrupt.  ARI also requires that the devices be
> listed in order, so if we find a function listed that is out of order,
> stop scanning to prevent loops.

Applied this one, thanks.  Yinghai, let me know if things still fail
for you and we can replace this patch.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux