From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89366] DisplayPort MST (multi-stream transport) "atomic sleep" Linux kernel bug Date: Sat, 28 Feb 2015 07:19:18 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0591798478==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id D964B6E043 for ; Fri, 27 Feb 2015 23:19:18 -0800 (PST) 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 --===============0591798478== Content-Type: multipart/alternative; boundary="1425107958.dBbCDb0c0.14773"; charset="UTF-8" --1425107958.dBbCDb0c0.14773 Date: Sat, 28 Feb 2015 07:19:18 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89366 Bug ID: 89366 Summary: DisplayPort MST (multi-stream transport) "atomic sleep" Linux kernel bug Product: DRI Version: unspecified Hardware: x86 (IA32) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: General Assignee: dri-devel@lists.freedesktop.org Reporter: adam_richter2004@yahoo.com [This is a slightly edited version of an email that I attempted to send to the dri-devel mailing list.] CONFIG_DEBUG_ATOMIC_SLEEP complains about the following locking problem in linux-4.0-rc1/drivers/gpu/drm/drm_dp_mst_topology.c: drm_dp_mst_wait_tx_reply --> wait_event_timeout --> check_txmsg_state --> mutex_lock I believe that any function called in the "condition" argument in the wait_event_timeout macro (in this case, check_txmsg_state) is not allowed to block when the condition is being evalutated to determine whether to unblock the process. I think the problem is real. On two different computers and three different DisplayPort MST hubs, plugging in a DisplayPort hub or having it plugged in from boot time results in a hang within a few minutes of doing a few "xrandr" commands. At first glance, it looked to me like it might be safe to remove the mutex_{,un}lock calls from check_txmsg_state (which is not called from anywhere else), and change the integer field txmsg->state to be an atomic_t (although I'd be surprised if there is existing hardware that supports an MST hub where the accessing that field is not atomic. However, altough removing those mutex calls eliminated the complaint from CONFIG_DEBUG_ATOMIC_SLEEP, it also resulted in the system sometimes seeming to ignore the MST hub and otherwise eventually getting a kernel memory fault in the DisplayPort MST code or another spontaneous reset (possibly deadlock follwed by a watchdog reset). Advice is welcome, although I am not blocked in my own efforts to analyze this further. I plan to post updates when I have more news. -- You are receiving this mail because: You are the assignee for the bug. --1425107958.dBbCDb0c0.14773 Date: Sat, 28 Feb 2015 07:19:18 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"
Bug ID 89366
Summary DisplayPort MST (multi-stream transport) "atomic sleep" Linux kernel bug
Product DRI
Version unspecified
Hardware x86 (IA32)
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component General
Assignee dri-devel@lists.freedesktop.org
Reporter adam_richter2004@yahoo.com

[This is a slightly edited version of an email that I attempted to send to the
dri-devel mailing list.]

CONFIG_DEBUG_ATOMIC_SLEEP complains about the following locking problem in
linux-4.0-rc1/drivers/gpu/drm/drm_dp_mst_topology.c:

drm_dp_mst_wait_tx_reply --> wait_event_timeout --> check_txmsg_state  -->
mutex_lock

I believe that any function called in the "condition" argument in the
wait_event_timeout macro (in this case, check_txmsg_state) is not allowed to
block when the condition is being evalutated to determine whether to unblock
the process.

I think the problem is real.  On two different computers and three different
DisplayPort MST hubs, plugging in a DisplayPort hub or having it plugged in
from boot time results in a hang within a few minutes of doing a few "xrandr"
commands.

At first glance, it looked to me like it might be safe to remove the
mutex_{,un}lock calls from check_txmsg_state (which is not called from anywhere
else), and change the integer field txmsg->state to be an atomic_t (although
I'd be surprised if there is existing hardware that supports an MST hub where
the accessing that field is not atomic.  However, altough removing those mutex
calls eliminated the complaint from CONFIG_DEBUG_ATOMIC_SLEEP, it also resulted
in the system sometimes seeming to ignore the MST hub and otherwise eventually
getting a kernel memory fault in the DisplayPort MST code or another
spontaneous reset (possibly deadlock follwed by a watchdog reset).

Advice is welcome, although I am not blocked in my own efforts to analyze this
further.  I plan to post updates when I have more news.


You are receiving this mail because:
  • You are the assignee for the bug.
--1425107958.dBbCDb0c0.14773-- --===============0591798478== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0591798478==--