From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@bugzilla.kernel.org
Subject: [Bug 83341] New: Failure to check return value leads to missed
-EDEADLK and a kernel warning printout
Date: Wed, 27 Aug 2014 14:23:16 +0000
Message-ID:
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Return-path:
Received: from mail.kernel.org (mail.kernel.org [198.145.19.201])
by gabe.freedesktop.org (Postfix) with ESMTP id 7F8716E45E
for ; Wed, 27 Aug 2014 07:23:19 -0700 (PDT)
Received: from mail.kernel.org (localhost [127.0.0.1])
by mail.kernel.org (Postfix) with ESMTP id 498C720158
for ; Wed, 27 Aug 2014 14:23:18 +0000 (UTC)
Received: from bugzilla2.web.kernel.org (bugzilla2.web.kernel.org
[172.20.200.52])
by mail.kernel.org (Postfix) with ESMTP id DEF6D200DE
for ; Wed, 27 Aug 2014 14:23:16 +0000 (UTC)
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dri-devel-bounces@lists.freedesktop.org
Sender: "dri-devel"
To: dri-devel@lists.freedesktop.org
List-Id: dri-devel@lists.freedesktop.org
https://bugzilla.kernel.org/show_bug.cgi?id=83341
Bug ID: 83341
Summary: Failure to check return value leads to missed -EDEADLK
and a kernel warning printout
Product: Drivers
Version: 2.5
Kernel Version: 3.16 and above
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(DRI - non Intel)
Assignee: drivers_video-dri@kernel-bugs.osdl.org
Reporter: thellstrom@vmware.com
Regression: No
Please see
https://bugzilla.redhat.com/show_bug.cgi?id=1114160
The error is in the following lines, where no error checking takes place on
drm_modeset_lock().
drm_modeset_lock_all(dev);
drm_modeset_lock_init(&crtc->mutex);
/* dropped by _unlock_all(): */
drm_modeset_lock(&crtc->mutex, config->acquire_ctx);
This is probably under the assumption that the lock is just initialized and
will therefore always succeed. However, the ww_mutex subsystem has a fault
injection option and when that kicks in, that lock may fail.
Fixing this turns out to be a little involved. Personally I think a trylock()
would be in order here, but that would mean extending the drm_modeset_lock()
API.
The error message copied from Redhat Bugzilla:
[ 5.082609] ------------[ cut here ]------------
[ 5.083548] WARNING: CPU: 0 PID: 369 at
drivers/gpu/drm/drm_modeset_lock.c:91 drm_modeset_drop_locks+0x71/0x80 [drm]()
[ 5.084483] Modules linked in: vmwgfx(+) drm_kms_helper ttm drm mptspi
scsi_transport_spi e1000 mptscsih mptbase i2c_core ata_generic pata_acpi
[ 5.085536] CPU: 0 PID: 369 Comm: systemd-udevd Not tainted
3.16.0-0.rc2.git3.1.fc21.x86_64 #1
[ 5.086689] Hardware name: VMware, Inc. VMware Virtual Platform/440BX
Desktop Reference Platform, BIOS 6.00 07/31/2013
[ 5.088693] 0000000000000000 0000000054dc8e0c ffff880036e27910
ffffffff81807c4c
[ 5.090714] 0000000000000000 ffff880036e27948 ffffffff8109b3ed
ffff880039073000
[ 5.091584] ffff8800391ee900 ffff8800391ee900 ffff88003890fe00
ffff880000400000
[ 5.092662] Call Trace:
[ 5.093311] [] dump_stack+0x4d/0x66
[ 5.093867] [] warn_slowpath_common+0x7d/0xa0
[ 5.094562] [] warn_slowpath_null+0x1a/0x20
[ 5.095241] [] drm_modeset_drop_locks+0x71/0x80 [drm]
[ 5.095773] [] drm_modeset_unlock_all+0x2e/0x70 [drm]
[ 5.096196] [] drm_crtc_init_with_planes+0xa7/0x110 [drm]
[ 5.096659] [] drm_crtc_init+0x33/0x40 [drm_kms_helper]
[ 5.097050] []
vmw_kms_init_screen_object_display+0x1a9/0x260 [vmwgfx]
[ 5.098174] [] vmw_kms_init+0x59/0x70 [vmwgfx]
[ 5.098725] [] vmw_driver_load+0x8d0/0xda0 [vmwgfx]
[ 5.099129] [] drm_dev_register+0xad/0x100 [drm]
[ 5.099486] [] drm_get_pci_dev+0x8d/0x200 [drm]
[ 5.099900] [] vmw_probe+0x15/0x20 [vmwgfx]
[ 5.100274] [] local_pci_probe+0x45/0xa0
[ 5.100626] [] ? pci_match_device+0xe5/0x110
[ 5.100959] [] pci_device_probe+0xf9/0x150
[ 5.101286] [] driver_probe_device+0xa3/0x400
[ 5.101589] [] __driver_attach+0x8b/0x90
[ 5.101934] [] ? __device_attach+0x40/0x40
[ 5.102242] [] bus_for_each_dev+0x73/0xc0
[ 5.102545] [] driver_attach+0x1e/0x20
[ 5.102808] [] bus_add_driver+0x188/0x260
[ 5.103075] [] driver_register+0x64/0xf0
[ 5.103352] [] __pci_register_driver+0x60/0x70
[ 5.103616] [] drm_pci_init+0x10a/0x140 [drm]
[ 5.103913] [] ? 0xffffffffa012dfff
[ 5.104176] [] vmwgfx_init+0x18/0x1000 [vmwgfx]
[ 5.104482] [] do_one_initcall+0xd8/0x210
[ 5.104745] [] ? __vunmap+0xba/0x120
[ 5.105015] [] load_module+0x2110/0x2740
[ 5.105275] [] ? store_uevent+0x70/0x70
[ 5.105551] [] ? lock_release_holdtime.part.28+0xf/0x200
[ 5.105951] [] ? lock_release_non_nested+0x3c6/0x3d0
[ 5.106357] [] SyS_init_module+0xe7/0x140
[ 5.106849] [] system_call_fastpath+0x16/0x1b
[ 5.107162] ---[ end trace 225f20829bb0d8e8 ]---
--
You are receiving this mail because:
You are watching the assignee of the bug.