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


Groups > linux.kernel > #1272855 > unrolled thread

[PATCH v2] drm/tegra: fix locking of SET_TILING ioctl

Started byAlexandre Courbot <acourbot@nvidia.com>
First post2015-11-19 06:00 +0100
Last post2015-11-19 06:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] drm/tegra: fix locking of SET_TILING ioctl Alexandre Courbot <acourbot@nvidia.com> - 2015-11-19 06:00 +0100

#1272855 — [PATCH v2] drm/tegra: fix locking of SET_TILING ioctl

FromAlexandre Courbot <acourbot@nvidia.com>
Date2015-11-19 06:00 +0100
Subject[PATCH v2] drm/tegra: fix locking of SET_TILING ioctl
Message-ID<qwpu9-4BN-15@gated-at.bofh.it>
Commit ef4c6270bf28 made the check of whether struct_mutex is held more
verbose, and this triggers a warning when calling
drm_gem_object_unreference() from tegra_gem_set_tiling() which does not
acquire that lock.

Use drm_gem_object_unreference_unlocked() instead to ensure locking is
handled correctly.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
v2: fix commit log according to Daniel's comments, add review tag.

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

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index cc48334ef164..c0ae89865958 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -683,7 +683,7 @@ static int tegra_gem_set_tiling(struct drm_device *drm, void *data,
 	bo->tiling.mode = mode;
 	bo->tiling.value = value;
 
-	drm_gem_object_unreference(gem);
+	drm_gem_object_unreference_unlocked(gem);
 
 	return 0;
 }
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web