From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 3/3] drm/i915: be more paranoid with the flink name refcounting
Date: Mon, 23 Jul 2012 10:27:27 +0200 [thread overview]
Message-ID: <1343032047-5713-3-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1343032047-5713-1-git-send-email-daniel.vetter@ffwll.ch>
We should _never_ call handle_unref without having a name handle.
Doing so would be a bug, so yell around about if this happens with a
loud WARN_ON.
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
include/drm/drmP.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 3837e69..d94c6bd 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1677,7 +1677,7 @@ drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj)
if (obj == NULL)
return;
- if (atomic_read(&obj->handle_count) == 0)
+ if (WARN_ON(atomic_read(&obj->handle_count) == 0))
return;
/*
--
1.7.10.4
next prev parent reply other threads:[~2012-07-23 9:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 8:27 [PATCH 1/3] drm/prime: fixup the dma buf export cache locking Daniel Vetter
2012-07-23 8:27 ` [PATCH 2/3] drm/gem: fix up flink name create race Daniel Vetter
2012-07-23 8:27 ` Daniel Vetter [this message]
2012-07-23 9:26 ` [PATCH] drm/prime: fixup the dma buf export cache locking Daniel Vetter
2012-08-24 4:13 ` Dave Airlie
2012-08-24 12:45 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343032047-5713-3-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.