From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 92480] [Patch] Linux mutex leak in drm_dp_get_mst_branch
Date: Thu, 15 Oct 2015 21:08:34 +0000
Message-ID:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0560286664=="
Return-path:
Received: from culpepper.freedesktop.org (unknown [131.252.210.165])
by gabe.freedesktop.org (Postfix) with ESMTP id 0138E6E16F
for ; Thu, 15 Oct 2015 14:08:35 -0700 (PDT)
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
--===============0560286664==
Content-Type: multipart/alternative; boundary="1444943314.48EB1fE0.18724"; charset="UTF-8"
--1444943314.48EB1fE0.18724
Date: Thu, 15 Oct 2015 21:08:34 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=92480
Bug ID: 92480
Summary: [Patch] Linux mutex leak in drm_dp_get_mst_branch
Product: DRI
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: General
Assignee: dri-devel@lists.freedesktop.org
Reporter: adam_richter2004@yahoo.com
I believe I have found a mutex leak in drm_dp_get_mst_branch_device() in
linux/drivers/gpu/drm/drm_dp_mst_topology.c in kernels 4.2-rc1 through the
current version, 4.3-rc5, where the function can take an error exit without
doing mutex_unlock(&mgr_lock). I have attached a proposed patch.
Unfortunately, since I made the patch, I have not been able to trigger the
error branch that the patch fixes, but I did find the bug by observing that
error branch executing and printing an error message that I believe is unique
to that branch ("*ERROR* failed to lookup MSTB"):
[ 36.944273] [drm:gen8_irq_handler [i915]] *ERROR* The master control
interrupt lied (SDE)!
[ 74.576811] [drm:drm_dp_get_mst_branch_device [drm_kms_helper]] *ERROR*
failed to lookup MSTB with lct 2, rad 10
[ 74.587704] BUG: workqueue leaked lock or atomic: kworker/u8:0/0x00000000/6
[ 74.587704] last function: i915_digport_work_func [i915]
[ 74.655752] [drm:gen8_irq_handler [i915]] *ERROR* The master control
interrupt lied (SDE)!
I think this patch is also arguably an infinitesimal improvement in that it
depends less on the optimizer, by reducing two references to port->mstb to one.
Anyhow, if the patch looks good, I would be delighted to if the appropriate
person (Dave?) would integrate it for submission upstream.
Thanks in advance for any feedback on this.
--
You are receiving this mail because:
You are the assignee for the bug.
--1444943314.48EB1fE0.18724
Date: Thu, 15 Oct 2015 21:08:34 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
| Bug ID |
92480
|
| Summary |
[Patch] Linux mutex leak in drm_dp_get_mst_branch
|
| Product |
DRI
|
| Version |
unspecified
|
| Hardware |
x86-64 (AMD64)
|
| OS |
Linux (All)
|
| Status |
NEW
|
| Severity |
normal
|
| Priority |
medium
|
| Component |
General
|
| Assignee |
dri-devel@lists.freedesktop.org
|
| Reporter |
adam_richter2004@yahoo.com
|
I believe I have found a mutex leak in drm_dp_get_mst_branch_device() in
linux/drivers/gpu/drm/drm_dp_mst_topology.c in kernels 4.2-rc1 through the
current version, 4.3-rc5, where the function can take an error exit without
doing mutex_unlock(&mgr_lock). I have attached a proposed patch.
Unfortunately, since I made the patch, I have not been able to trigger the
error branch that the patch fixes, but I did find the bug by observing that
error branch executing and printing an error message that I believe is unique
to that branch ("*ERROR* failed to lookup MSTB"):
[ 36.944273] [drm:gen8_irq_handler [i915]] *ERROR* The master control
interrupt lied (SDE)!
[ 74.576811] [drm:drm_dp_get_mst_branch_device [drm_kms_helper]] *ERROR*
failed to lookup MSTB with lct 2, rad 10
[ 74.587704] BUG: workqueue leaked lock or atomic: kworker/u8:0/0x00000000/6
[ 74.587704] last function: i915_digport_work_func [i915]
[ 74.655752] [drm:gen8_irq_handler [i915]] *ERROR* The master control
interrupt lied (SDE)!
I think this patch is also arguably an infinitesimal improvement in that it
depends less on the optimizer, by reducing two references to port->mstb to one.
Anyhow, if the patch looks good, I would be delighted to if the appropriate
person (Dave?) would integrate it for submission upstream.
Thanks in advance for any feedback on this.
You are receiving this mail because:
- You are the assignee for the bug.
--1444943314.48EB1fE0.18724--
--===============0560286664==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs
IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0
cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK
--===============0560286664==--
From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 92480] [Patch] Linux mutex leak in drm_dp_get_mst_branch
Date: Thu, 15 Oct 2015 21:11:26 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1668896397=="
Return-path:
Received: from culpepper.freedesktop.org (unknown [131.252.210.165])
by gabe.freedesktop.org (Postfix) with ESMTP id 55B2D6E160
for ; Thu, 15 Oct 2015 14:11:26 -0700 (PDT)
In-Reply-To:
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
--===============1668896397==
Content-Type: multipart/alternative; boundary="1444943486.1873Ba0.19638"; charset="UTF-8"
--1444943486.1873Ba0.19638
Date: Thu, 15 Oct 2015 21:11:26 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=92480
--- Comment #1 from Adam J. Richter ---
Created attachment 118904
--> https://bugs.freedesktop.org/attachment.cgi?id=118904&action=edit
Patch to fix mutex leak on error return of drm_dp_get_mst_branch_device in
linux-4.3-rc5/drivers/gpu/drm/drm_dp_mst_topology.c
--
You are receiving this mail because:
You are the assignee for the bug.
--1444943486.1873Ba0.19638
Date: Thu, 15 Oct 2015 21:11:26 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
You are receiving this mail because:
- You are the assignee for the bug.
--1444943486.1873Ba0.19638--
--===============1668896397==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs
IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0
cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK
--===============1668896397==--
From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 92480] [Patch] Linux mutex leak in drm_dp_get_mst_branch
Date: Fri, 16 Oct 2015 09:43:28 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1488445888=="
Return-path:
Received: from culpepper.freedesktop.org (unknown [131.252.210.165])
by gabe.freedesktop.org (Postfix) with ESMTP id 914BA6E703
for ; Fri, 16 Oct 2015 02:43:28 -0700 (PDT)
In-Reply-To:
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
--===============1488445888==
Content-Type: multipart/alternative; boundary="1444988608.Cf5C0.20039"; charset="UTF-8"
--1444988608.Cf5C0.20039
Date: Fri, 16 Oct 2015 09:43:28 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=92480
--- Comment #2 from Jani Nikula ---
Please send your (In reply to Adam J. Richter from comment #0)
> Anyhow, if the patch looks good, I would be delighted to if the appropriate
> person (Dave?) would integrate it for submission upstream.
Good catch!
Reviewed-by: Jani Nikula
Please send the patch in proper patch format with your Signed-off-by to
dri-devel@lists.freedesktop.org mailing list. See
Documentation/SubmittingPatches for help.
--
You are receiving this mail because:
You are the assignee for the bug.
--1444988608.Cf5C0.20039
Date: Fri, 16 Oct 2015 09:43:28 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Comment # 2
on bug 92480
from Jani Nikula
Please send your (In reply to Adam J. Richter from comment #0)
> Anyhow, if the patch looks good, I would be delighted to if the appropriate
> person (Dave?) would integrate it for submission upstream.
Good catch!
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Please send the patch in proper patch format with your Signed-off-by to
dri-devel@lists.freedesktop.org mailing list. See
Documentation/SubmittingPatches for help.
You are receiving this mail because:
- You are the assignee for the bug.
--1444988608.Cf5C0.20039--
--===============1488445888==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs
IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0
cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK
--===============1488445888==--
From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 92480] [Patch] Linux mutex leak in drm_dp_get_mst_branch
Date: Wed, 28 Oct 2015 12:58:02 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0851367325=="
Return-path:
Received: from culpepper.freedesktop.org (unknown [131.252.210.165])
by gabe.freedesktop.org (Postfix) with ESMTP id 7AA706E8AB
for ; Wed, 28 Oct 2015 05:58:02 -0700 (PDT)
In-Reply-To:
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
--===============0851367325==
Content-Type: multipart/alternative; boundary="1446037082.c8D62b0.11442"; charset="UTF-8"
--1446037082.c8D62b0.11442
Date: Wed, 28 Oct 2015 12:58:02 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=92480
Jani Nikula changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jani Nikula ---
commit 6749c9f023d49adca3ca4773e93282b95ceebfb5
Author: Adam Richter
Date: Fri Oct 16 03:33:02 2015 -0700
drm: fix mutex leak in drm_dp_get_mst_branch_device
--
You are receiving this mail because:
You are the assignee for the bug.
--1446037082.c8D62b0.11442
Date: Wed, 28 Oct 2015 12:58:02 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Jani Nikula
changed
bug 92480
| What |
Removed |
Added |
| Status |
NEW
|
RESOLVED
|
| Resolution |
---
|
FIXED
|
You are receiving this mail because:
- You are the assignee for the bug.
--1446037082.c8D62b0.11442--
--===============0851367325==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs
IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0
cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK
--===============0851367325==--
From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 92480] [Patch] Linux mutex leak in drm_dp_get_mst_branch
Date: Wed, 28 Oct 2015 12:58:47 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1983747078=="
Return-path:
Received: from culpepper.freedesktop.org (unknown [131.252.210.165])
by gabe.freedesktop.org (Postfix) with ESMTP id 4EB166E8AD
for ; Wed, 28 Oct 2015 05:58:48 -0700 (PDT)
In-Reply-To:
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
--===============1983747078==
Content-Type: multipart/alternative; boundary="1446037127.DF55DA40.11742"; charset="UTF-8"
--1446037127.DF55DA40.11742
Date: Wed, 28 Oct 2015 12:58:47 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=92480
--- Comment #4 from Jani Nikula ---
also cherry-picked to v4.3 as
commit 30730c7f5943b3beace1e29f7f1476e05de3da14
Author: Adam Richter
Date: Fri Oct 16 03:33:02 2015 -0700
drm: fix mutex leak in drm_dp_get_mst_branch_device
--
You are receiving this mail because:
You are the assignee for the bug.
--1446037127.DF55DA40.11742
Date: Wed, 28 Oct 2015 12:58:47 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
You are receiving this mail because:
- You are the assignee for the bug.
--1446037127.DF55DA40.11742--
--===============1983747078==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs
IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0
cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK
--===============1983747078==--