Re: pci_get_dev_by_id() from interrupt handlers

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

 



On Tue, Apr 20, 2010 at 06:04:24PM +0200, Joerg Roedel wrote:
> Hi Jesse,
> 
> I have a question regarding the warning in the pci_get_dev_by_id()
> [search.c] function which triggers when called from interrupt context.
> As far as I have seen this function should be save to be called in
> atomic mode.

Are you sure?

> Is there any other reason it should not be called in interrupt
> handlers?

klist traversal is not safe to be done in interrupt context as the
spinlock is not told to be interrupt safe.  Now you could go and change
the klist core to be interrupt safe, but you should probably rethink
your need here first.

> I need to (indirectly) call this function for my IOMMU driver to
> handle events from the IOMMU.

>From interrupt?  Why not use an interrupt thread instead if you really
need to do this.

Actually, what are you trying to accomplish here?

thanks,

greg k-h
--
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