On Sat, Jun 18, 2016 at 12:47:21AM +0100, Emil Velikov wrote: > On 18 June 2016 at 00:00, Emil Velikov <emil.l.velikov@xxxxxxxxx> wrote: > > >> @@ -134,24 +152,21 @@ static int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv) > >> > >> /* take another reference for the copy in the local file priv */ > >> old_master = fpriv->master; > >> - fpriv->master = drm_master_get(dev->master); > >> + fpriv->master = drm_master_create(dev); > To avoid the leak just drop the fpriv->minor->dev->master = > drm_master_create() a few lines above (+ the associated comment/error > handling drm_master_put(fpriv->minor->dev->master)) > > >> + if (!fpriv->master) > >> + return -ENOMEM; > >> > ... and restore the old_master before the return "fpriv->master = old_master;" > > With that and the other minor comments the series is > Reviewed-by: Emil Velikov <emil.l.velikov@xxxxxxxxx> This one is a real mess, I've redone it but don't feel like I can just add your r-b. I'll resend again. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx