Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347466 > unrolled thread

[PATCH 4.4 053/342] drm/gma500: Use correct unref in the gem bo create function

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-03-02 02:30 +0100
Last post2016-03-02 02:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 053/342] drm/gma500: Use correct unref in the gem bo create function Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 02:30 +0100

#1347466 — [PATCH 4.4 053/342] drm/gma500: Use correct unref in the gem bo create function

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-03-02 02:30 +0100
Subject[PATCH 4.4 053/342] drm/gma500: Use correct unref in the gem bo create function
Message-ID<r83LZ-nH-17@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Daniel Vetter <daniel.vetter@ffwll.ch>

commit d3e376f52d095103ca51dbda4d6ff8aaf488f98f upstream.

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: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Daniel 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/gma500/gem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/gma500/gem.c
+++ b/drivers/gpu/drm/gma500/gem.c
@@ -130,7 +130,7 @@ int psb_gem_create(struct drm_file *file
 		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;
 }

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web