提交 fb89ac51 编写于 作者: T Thomas Hellstrom 提交者: Dave Airlie

drm/vmwgfx: Fix an incorrect lock check

With CONFIG_SMP=n and CONFIG_DEBUG_SPINLOCK=y the vmwgfx kernel module
would unconditionally throw a bug when checking for a held spinlock
in the command buffer code. Fix this by using a lockdep check.

Cc: <stable@vger.kernel.org>
Reported-and-tested-by: NTetsuo Handa <penguin-kernel@i-love-sakura.ne.jp>
Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: NSinclair Yeh <syeh@vmware.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 38b17519
...@@ -247,7 +247,7 @@ static void __vmw_cmdbuf_header_free(struct vmw_cmdbuf_header *header) ...@@ -247,7 +247,7 @@ static void __vmw_cmdbuf_header_free(struct vmw_cmdbuf_header *header)
{ {
struct vmw_cmdbuf_man *man = header->man; struct vmw_cmdbuf_man *man = header->man;
BUG_ON(!spin_is_locked(&man->lock)); lockdep_assert_held_once(&man->lock);
if (header->inline_space) { if (header->inline_space) {
vmw_cmdbuf_header_inline_free(header); vmw_cmdbuf_header_inline_free(header);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册