Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756125AbcCBAo4 (ORCPT ); Tue, 1 Mar 2016 19:44:56 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:43800 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756065AbcCAX4t (ORCPT ); Tue, 1 Mar 2016 18:56:49 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=QJp0NF6pi7jEReg5vF1O4CCE7CGKRxdPcLFlOhVFHHx1JZxhCzCE5/2DCbB2ZeAy51K8J+/PCps1 nAd0rbru6exyZvkrRW7+PDhmxU9HAy7GsNp4hcSjRvowJOnAZi9FoFx9gnoQXoe0DHtG+UnqQC/U PCJVivWSwU6f1F0xLPo=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 169/342] drm/vmwgfx: Fix an incorrect lock check X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Thomas Hellstrom , Sinclair Yeh , Dave Airlie Message-Id: <20160301234533.423471476@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.533b4a39620246d496040361bff91e35 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:40 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1148 Lines: 33 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Hellstrom commit fb89ac5102ae2875d685c847e6b5dbc141622d43 upstream. 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. Reported-and-tested-by: Tetsuo Handa Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Signed-off-by: Dave Airlie Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c @@ -247,7 +247,7 @@ static void __vmw_cmdbuf_header_free(str { struct vmw_cmdbuf_man *man = header->man; - BUG_ON(!spin_is_locked(&man->lock)); + lockdep_assert_held_once(&man->lock); if (header->inline_space) { vmw_cmdbuf_header_inline_free(header);