Re: [RFC PATCH 0/6] pci: Rework is_added race fix and address bridge enable races

2018-08-16 Thread Benjamin Herrenschmidt
On Fri, 2018-08-17 at 14:48 +1000, Benjamin Herrenschmidt wrote: > The second part aims at fixing the enable/disable/set_master races, > and does so by providing a framework for future device state locking > issues. > > It introduces a pci_dev->state_mutex which is used at a lower level > than

Re: [RFC PATCH 0/6] pci: Rework is_added race fix and address bridge enable races

2018-08-16 Thread Benjamin Herrenschmidt
On Fri, 2018-08-17 at 14:48 +1000, Benjamin Herrenschmidt wrote: > The second part aims at fixing the enable/disable/set_master races, > and does so by providing a framework for future device state locking > issues. > > It introduces a pci_dev->state_mutex which is used at a lower level > than

[RFC PATCH 0/6] pci: Rework is_added race fix and address bridge enable races

2018-08-16 Thread Benjamin Herrenschmidt
This is really two series but since they conflict a bit separately here they are in one: First we undo the mess of those atomic priv_flags. The atomicity doesn't provide any security since there's no locking against the other state pertaining to those flags, it only protects the flags themselves.

[RFC PATCH 0/6] pci: Rework is_added race fix and address bridge enable races

2018-08-16 Thread Benjamin Herrenschmidt
This is really two series but since they conflict a bit separately here they are in one: First we undo the mess of those atomic priv_flags. The atomicity doesn't provide any security since there's no locking against the other state pertaining to those flags, it only protects the flags themselves.