Re: [PATCH] Driver Core patches for 2.6.10-rc1
From: Paul Mackerras
Date: Wed Nov 10 2004 - 16:48:30 EST
Russell King writes:
> On Wed, Nov 10, 2004 at 01:57:17PM +1100, Paul Mackerras wrote:
> > So we can get a driver's probe method called concurrently with its
> > bus's suspend or resume method.
> If correct, we probably have rather a lot of buggy drivers, because
> I certainly was not aware that this could happen. I suspect the
> average driver writer also would not be aware of that.
No doubt. I'd still like to hear from Greg or Pat about what the
concurrency rules are supposed to be, or were intended to be.
Note also that I said the *bus's* suspend/resume method. For PCI, we
have some protection since the PCI suspend/resume methods won't call
the individual pci driver's suspend/resume until pci_dev->driver is
set, which happens after the pci driver's probe routine has returned
(but of course the store to pci_dev->driver can get reordered on
some architectures since there is no barrier).
However, pci_dev->driver only gets cleared *after* the driver's remove
method returns. Thus it would be quite possible for a PCI device to
have its suspend/resume methods called while another CPU is in its
I think that what has saved us to some extent is that we only do
suspend/resume on UP machines so far.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/