All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 92480] [Patch] Linux mutex leak in drm_dp_get_mst_branch
Date: Thu, 15 Oct 2015 21:08:34 +0000	[thread overview]
Message-ID: <bug-92480-502@http.bugs.freedesktop.org/> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1910 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 3156 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2015-10-15 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 21:08 bugzilla-daemon [this message]
2015-10-15 21:11 ` [Bug 92480] [Patch] Linux mutex leak in drm_dp_get_mst_branch bugzilla-daemon
2015-10-16  9:43 ` bugzilla-daemon
2015-10-28 12:58 ` bugzilla-daemon
2015-10-28 12:58 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-92480-502@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.