[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100420163215.GB3270@kroah.com>
Date: Tue, 20 Apr 2010 09:32:15 -0700
From: Greg KH <greg@...ah.com>
To: Joerg Roedel <joerg.roedel@....com>
Cc: Jesse Barnes <jbarnes@...tuousgeek.org>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: pci_get_dev_by_id() from interrupt handlers
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists