[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v3

2014-03-28 Thread David Herrmann
Hi On Fri, Mar 28, 2014 at 12:52 PM, Thomas Hellstrom wrote: > Thanks. Want a Reviewed-By: or Acked-By: added? Oh, sure: Reviewed-by: David Herrmann Thanks David

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v3

2014-03-28 Thread Thomas Hellstrom
On 03/28/2014 12:23 PM, David Herrmann wrote: > Hi > > On Fri, Mar 28, 2014 at 10:34 AM, Thomas Hellstrom > wrote: >> The master management was previously protected by the >> drm_device::struct_mutex. >> In order to avoid locking order violations in a reworked dropped master >> security check in

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v3

2014-03-28 Thread David Herrmann
Hi On Fri, Mar 28, 2014 at 10:34 AM, Thomas Hellstrom wrote: > The master management was previously protected by the > drm_device::struct_mutex. > In order to avoid locking order violations in a reworked dropped master > security check in the vmwgfx driver, break it out into a separate > master

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v2

2014-03-28 Thread Thomas Hellstrom
On 03/28/2014 01:19 AM, David Herrmann wrote: > Hi > > > > I also don't quite understand why you move the struct_mutex locking > into drm_master_destroy() instead of requiring callers to lock it as > before? I mean, the whole function is protected by the lock.. Before, struct_mutex was required ou

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v3

2014-03-28 Thread Thomas Hellstrom
The master management was previously protected by the drm_device::struct_mutex. In order to avoid locking order violations in a reworked dropped master security check in the vmwgfx driver, break it out into a separate master_mutex. Locking order is master_mutex -> struct_mutex. Also remove drm_mas

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v2

2014-03-28 Thread Thomas Hellstrom
Hi, again! I've looked through the code again and have some answers to your questions. Will post an updated patch soon. On 03/28/2014 01:19 AM, David Herrmann wrote: > Hi > > On Thu, Mar 27, 2014 at 9:23 PM, Thomas Hellstrom > wrote: >> The master management was previously protected by the >>

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v2

2014-03-28 Thread Thomas Hellstrom
Hi, David. Thanks for reviewing. I'll try to address all your concerns and resend. /Thomas On 03/28/2014 01:19 AM, David Herrmann wrote: > Hi > > On Thu, Mar 27, 2014 at 9:23 PM, Thomas Hellstrom > wrote: >> The master management was previously protected by the >> drm_device::struct_mutex. >

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v2

2014-03-28 Thread David Herrmann
Hi On Thu, Mar 27, 2014 at 9:23 PM, Thomas Hellstrom wrote: > The master management was previously protected by the > drm_device::struct_mutex. > In order to avoid locking order violations in a reworked dropped master > security check in the vmwgfx driver, break it out into a separate > master

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex

2014-03-28 Thread David Herrmann
Hi On Wed, Mar 26, 2014 at 9:40 PM, Thomas Hellstrom wrote: >> - Why don't add a spin-lock to "drm_file" instead? Use that one to >> manage master contexts, but keep "struct_mutex" whenever calling into >> driver callbacks (set_master/drop_master) > > See above. We can't have a lock in the drm_

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex v2

2014-03-27 Thread Thomas Hellstrom
The master management was previously protected by the drm_device::struct_mutex. In order to avoid locking order violations in a reworked dropped master security check in the vmwgfx driver, break it out into a separate master_mutex. Also remove drm_master::blocked since it's not used. v2: Add an i

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex

2014-03-26 Thread Daniel Vetter
On Wed, Mar 26, 2014 at 09:40:18PM +0100, Thomas Hellstrom wrote: > On 03/26/2014 08:08 PM, David Herrmann wrote: > > "struct_mutex" is used to serialize all entry-points into > > the drm-device (and thus the driver) and also, often implicitly, as > > spin-lock for "struct drm_device" data protecti

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex

2014-03-26 Thread Thomas Hellstrom
On 03/26/2014 08:08 PM, David Herrmann wrote: > Hi > > On Tue, Mar 25, 2014 at 2:18 PM, Thomas Hellstrom > wrote: >> The master management was previously protected by the >> drm_device::struct_mutex. >> In order to avoid locking order violations in a reworked dropped master >> security check in

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex

2014-03-26 Thread David Herrmann
Hi On Tue, Mar 25, 2014 at 2:18 PM, Thomas Hellstrom wrote: > The master management was previously protected by the > drm_device::struct_mutex. > In order to avoid locking order violations in a reworked dropped master > security check in the vmwgfx driver, break it out into a separate > master

[PATCH 06/16] drm: Protect the master management with a drm_device::master_mutex

2014-03-25 Thread Thomas Hellstrom
The master management was previously protected by the drm_device::struct_mutex. In order to avoid locking order violations in a reworked dropped master security check in the vmwgfx driver, break it out into a separate master_mutex. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- dri