Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-03-26 Thread Geert Uytterhoeven
Hi John, CC robh On Tue, Mar 26, 2019 at 12:42 PM John Garry wrote: > > Memory is incorrectly freed using the direct ops, as dma_map_ops = NULL. > > Oops... > > > > After reversing the order of the calls to arch_teardown_dma_ops() and > > devres_release_all(), dma_map_ops is still valid, and

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-03-07 Thread Greg Kroah-Hartman
On Thu, Mar 07, 2019 at 02:52:55PM +, Robin Murphy wrote: > Hi John, > > On 07/03/2019 14:45, John Garry wrote: > [...] > > Hi guys, > > > > Any idea what happened to this fix? > > It's been in -next for a while (commit 376991db4b64) - I assume it will land > shortly and hit stable

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-03-07 Thread John Garry
On 07/03/2019 14:52, Robin Murphy wrote: Hi John, Hi Robin, ok, fine. It's a pain bisecting another rmmod issue with it... Cheers, On 07/03/2019 14:45, John Garry wrote: [...] Hi guys, Any idea what happened to this fix? It's been in -next for a while (commit 376991db4b64) - I assume

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-03-07 Thread Robin Murphy
Hi John, On 07/03/2019 14:45, John Garry wrote: [...] Hi guys, Any idea what happened to this fix? It's been in -next for a while (commit 376991db4b64) - I assume it will land shortly and hit stable thereafter, at which point somebody gets to sort out the manual backport past 4.20.

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-03-07 Thread John Garry
On 11/02/2019 10:22, Robin Murphy wrote: On 08/02/2019 18:55, Geert Uytterhoeven wrote: Hi Robin, On Fri, Feb 8, 2019 at 6:55 PM Robin Murphy wrote: On 08/02/2019 16:40, Joerg Roedel wrote: On Thu, Feb 07, 2019 at 08:36:53PM +0100, Geert Uytterhoeven wrote: diff --git a/drivers/base/dd.c

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-02-11 Thread Robin Murphy
On 08/02/2019 18:55, Geert Uytterhoeven wrote: Hi Robin, On Fri, Feb 8, 2019 at 6:55 PM Robin Murphy wrote: On 08/02/2019 16:40, Joerg Roedel wrote: On Thu, Feb 07, 2019 at 08:36:53PM +0100, Geert Uytterhoeven wrote: diff --git a/drivers/base/dd.c b/drivers/base/dd.c index

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-02-08 Thread Geert Uytterhoeven
Hi Robin, On Fri, Feb 8, 2019 at 6:55 PM Robin Murphy wrote: > On 08/02/2019 16:40, Joerg Roedel wrote: > > On Thu, Feb 07, 2019 at 08:36:53PM +0100, Geert Uytterhoeven wrote: > >> diff --git a/drivers/base/dd.c b/drivers/base/dd.c > >> index 8ac10af17c0043a3..d62487d024559620 100644 > >> ---

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-02-08 Thread Robin Murphy
On 08/02/2019 16:40, Joerg Roedel wrote: Hi Geert, On Thu, Feb 07, 2019 at 08:36:53PM +0100, Geert Uytterhoeven wrote: diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 8ac10af17c0043a3..d62487d024559620 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -968,9 +968,9 @@ static

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-02-08 Thread Joerg Roedel
Hi Geert, On Thu, Feb 07, 2019 at 08:36:53PM +0100, Geert Uytterhoeven wrote: > diff --git a/drivers/base/dd.c b/drivers/base/dd.c > index 8ac10af17c0043a3..d62487d024559620 100644 > --- a/drivers/base/dd.c > +++ b/drivers/base/dd.c > @@ -968,9 +968,9 @@ static void __device_release_driver(struct

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-02-08 Thread Robin Murphy
On 07/02/2019 19:36, Geert Uytterhoeven wrote: When unbinding the (IOMMU-enabled) R-Car SATA device on Salvator-XS (R-Car H3 ES2.0), in preparation of rebinding against vfio-platform for device pass-through for virtualization:     echo ee30.sata > /sys/bus/platform/drivers/sata_rcar/unbind

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-02-08 Thread Rafael J. Wysocki
On Thu, Feb 7, 2019 at 8:42 PM Geert Uytterhoeven wrote: > > When unbinding the (IOMMU-enabled) R-Car SATA device on Salvator-XS > (R-Car H3 ES2.0), in preparation of rebinding against vfio-platform for > device pass-through for virtualization: > > echo ee30.sata >

Re: [PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-02-07 Thread Christoph Hellwig
Yes, we should not reset the DMA ops before releasing all resources: Acked-by: Christoph Hellwig

[PATCH/RFC] driver core: Postpone DMA tear-down until after devres release

2019-02-07 Thread Geert Uytterhoeven
When unbinding the (IOMMU-enabled) R-Car SATA device on Salvator-XS (R-Car H3 ES2.0), in preparation of rebinding against vfio-platform for device pass-through for virtualization:     echo ee30.sata > /sys/bus/platform/drivers/sata_rcar/unbind the kernel crashes with:     Unable to handle