Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22300ab6 authored by Daniel Vetter's avatar Daniel Vetter Committed by Sasha Levin
Browse files

drm/gma500: Use correct unref in the gem bo create function



[ Upstream commit d3e376f52d095103ca51dbda4d6ff8aaf488f98f ]

This is called without dev->struct_mutex held, we need to use the
_unlocked variant.

Never caught in the wild since you'd need an evil userspace which
races a gem_close ioctl call with the in-progress open.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Acked-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1448271183-20523-17-git-send-email-daniel.vetter@ffwll.ch


Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 99cdf12b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ int psb_gem_create(struct drm_file *file, struct drm_device *dev, u64 size,
		return ret;
	}
	/* We have the initial and handle reference but need only one now */
	drm_gem_object_unreference(&r->gem);
	drm_gem_object_unreference_unlocked(&r->gem);
	*handlep = handle;
	return 0;
}