[Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-29 Thread Rob Clark
From: Rob Clark If a GEM object is allocated, and then exported as a dma-buf fd which is mmap'd before or without the GEM buffer being directly mmap'd, the vma_node could be unitialized. This leads to a situation where the CPU mapping is not correctly torn down in drm_vma_node_unmap(). Fixes: e

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Thomas Zimmermann
Hi Am 29.05.22 um 18:29 schrieb Rob Clark: From: Rob Clark If a GEM object is allocated, and then exported as a dma-buf fd which is mmap'd before or without the GEM buffer being directly mmap'd, the vma_node could be unitialized. This leads to a situation where the CPU mapping is not correctl

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann wrote: > > Hi > > Am 29.05.22 um 18:29 schrieb Rob Clark: > > From: Rob Clark > > > > If a GEM object is allocated, and then exported as a dma-buf fd which is > > mmap'd before or without the GEM buffer being directly mmap'd, the > > vma_node cou

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Thomas Zimmermann
Hi Am 30.05.22 um 15:47 schrieb Rob Clark: On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann wrote: Hi Am 29.05.22 um 18:29 schrieb Rob Clark: From: Rob Clark If a GEM object is allocated, and then exported as a dma-buf fd which is mmap'd before or without the GEM buffer being directly m

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 7:16 AM Thomas Zimmermann wrote: > > Hi > > Am 30.05.22 um 15:47 schrieb Rob Clark: > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > > wrote: > >> > >> Hi > >> > >> Am 29.05.22 um 18:29 schrieb Rob Clark: > >>> From: Rob Clark > >>> > >>> If a GEM object is alloc

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Daniel Vetter
On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > wrote: > > > > Hi > > > > Am 29.05.22 um 18:29 schrieb Rob Clark: > > > From: Rob Clark > > > > > > If a GEM object is allocated, and then exported as a dma-buf fd which is > > > mmap'd befor

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > > On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > > > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > > wrote: > > > > > > Hi > > > > > > Am 29.05.22 um 18:29 schrieb Rob Clark: > > > > From: Rob Clark > > > > > > > > If a GEM obje

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Thomas Zimmermann
Hi Am 30.05.22 um 17:41 schrieb Rob Clark: On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: On Mon, 30 May 2022 at 15:54, Rob Clark wrote: On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann wrote: Hi Am 29.05.22 um 18:29 schrieb Rob Clark: From: Rob Clark If a GEM object is allo

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 10:20 AM Thomas Zimmermann wrote: > > Hi > > Am 30.05.22 um 17:41 schrieb Rob Clark: > > On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > >> > >> On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > >>> > >>> On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > >>> wr

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-31 Thread Daniel Vetter
On Mon, 30 May 2022 at 17:41, Rob Clark wrote: > > On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > > > > On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > > > > > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > > > wrote: > > > > > > > > Hi > > > > > > > > Am 29.05.22 um 18:29 sch

Re: [Freedreno] [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-31 Thread Rob Clark
On Tue, May 31, 2022 at 5:32 AM Daniel Vetter wrote: > > On Mon, 30 May 2022 at 17:41, Rob Clark wrote: > > > > On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > > > > > > On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > > > > > > > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > >