Re: [PATCH] drm/nouveau/dmem: missing mutex_lock in error path

2019-06-16 Thread John Hubbard
On 6/14/19 10:39 AM, Ralph Campbell wrote: > On 6/13/19 5:49 PM, John Hubbard wrote: >> On 6/13/19 5:11 PM, Ralph Campbell wrote: ... >> Actually, the pre-existing code is a little concerning. Your change preserves >> the behavior, but it seems questionable to be doing a "return 0" (whether >> via

Re: [PATCH] drm/nouveau/dmem: missing mutex_lock in error path

2019-06-16 Thread Ralph Campbell
On 6/13/19 5:49 PM, John Hubbard wrote: On 6/13/19 5:11 PM, Ralph Campbell wrote: In nouveau_dmem_pages_alloc(), the drm->dmem->mutex is unlocked before calling nouveau_dmem_chunk_alloc(). Reacquire the lock before continuing to the next page. Signed-off-by: Ralph Campbell --- I found this

Re: [PATCH] drm/nouveau/dmem: missing mutex_lock in error path

2019-06-14 Thread Jason Gunthorpe
On Thu, Jun 13, 2019 at 05:11:21PM -0700, Ralph Campbell wrote: > In nouveau_dmem_pages_alloc(), the drm->dmem->mutex is unlocked before > calling nouveau_dmem_chunk_alloc(). > Reacquire the lock before continuing to the next page. > > Signed-off-by: Ralph Campbell > --- > > I found this while

[PATCH] drm/nouveau/dmem: missing mutex_lock in error path

2019-06-14 Thread Ralph Campbell
In nouveau_dmem_pages_alloc(), the drm->dmem->mutex is unlocked before calling nouveau_dmem_chunk_alloc(). Reacquire the lock before continuing to the next page. Signed-off-by: Ralph Campbell --- I found this while testing Jason Gunthorpe's hmm tree but this is independant of those changes. I

Re: [PATCH] drm/nouveau/dmem: missing mutex_lock in error path

2019-06-14 Thread John Hubbard
On 6/13/19 5:11 PM, Ralph Campbell wrote: > In nouveau_dmem_pages_alloc(), the drm->dmem->mutex is unlocked before > calling nouveau_dmem_chunk_alloc(). > Reacquire the lock before continuing to the next page. > > Signed-off-by: Ralph Campbell > --- > > I found this while testing Jason