Re: [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-17 Thread Noralf Trønnes
Den 17.04.2019 15.26, skrev Daniel Vetter: > On Wed, Apr 17, 2019 at 03:24:00PM +0200, Daniel Vetter wrote: >> On Tue, Apr 16, 2019 at 08:46:24PM +0200, Noralf Trønnes wrote: >>> >>> >>> Den 16.04.2019 09.59, skrev Daniel Vetter: On Sun, Apr 07, 2019 at 06:52:33PM +0200, Noralf Trønnes

Re: [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-17 Thread Daniel Vetter
On Wed, Apr 17, 2019 at 03:24:00PM +0200, Daniel Vetter wrote: > On Tue, Apr 16, 2019 at 08:46:24PM +0200, Noralf Trønnes wrote: > > > > > > Den 16.04.2019 09.59, skrev Daniel Vetter: > > > On Sun, Apr 07, 2019 at 06:52:33PM +0200, Noralf Trønnes wrote: > > >> drm_fb_helper_is_bound() is used to

Re: [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-17 Thread Daniel Vetter
On Tue, Apr 16, 2019 at 08:46:24PM +0200, Noralf Trønnes wrote: > > > Den 16.04.2019 09.59, skrev Daniel Vetter: > > On Sun, Apr 07, 2019 at 06:52:33PM +0200, Noralf Trønnes wrote: > >> drm_fb_helper_is_bound() is used to check if DRM userspace is in control. > >> This is done by looking at the

Re: [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-16 Thread Noralf Trønnes
Den 16.04.2019 09.59, skrev Daniel Vetter: > On Sun, Apr 07, 2019 at 06:52:33PM +0200, Noralf Trønnes wrote: >> drm_fb_helper_is_bound() is used to check if DRM userspace is in control. >> This is done by looking at the fb on the primary plane. By the time >> fb-helper gets around to committing,

Re: [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-16 Thread Maxime Ripard
On Sun, Apr 07, 2019 at 06:52:33PM +0200, Noralf Trønnes wrote: > drm_fb_helper_is_bound() is used to check if DRM userspace is in control. > This is done by looking at the fb on the primary plane. By the time > fb-helper gets around to committing, it's possible that the facts have > changed. > >

Re: [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-16 Thread Daniel Vetter
On Sun, Apr 07, 2019 at 06:52:33PM +0200, Noralf Trønnes wrote: > drm_fb_helper_is_bound() is used to check if DRM userspace is in control. > This is done by looking at the fb on the primary plane. By the time > fb-helper gets around to committing, it's possible that the facts have > changed. > >

[PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-07 Thread Noralf Trønnes
drm_fb_helper_is_bound() is used to check if DRM userspace is in control. This is done by looking at the fb on the primary plane. By the time fb-helper gets around to committing, it's possible that the facts have changed. Avoid this race by holding the drm_device->master_mutex lock while