]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm: fix mutex leak in drm_dp_get_mst_branch_device
authorAdam Richter <adamrichter4@gmail.com>
Fri, 16 Oct 2015 10:33:02 +0000 (03:33 -0700)
committerDave Airlie <airlied@redhat.com>
Wed, 21 Oct 2015 22:29:08 +0000 (08:29 +1000)
commit30730c7f5943b3beace1e29f7f1476e05de3da14
tree2420503336aa1afaca73ad9be3b06e79e9aef407
parent1099f86044111e9a7807f09523e42d4c9d0fb781
drm: fix mutex leak in drm_dp_get_mst_branch_device

In Linux 4.3-rc5, there is an error case in drm_dp_get_branch_device
that returns without releasing mgr->lock, resulting a spew of kernel
messages about a kernel work function possibly having leaked a mutex
and presumably more serious adverse consequences later.  This patch
changes the error to "goto out" to unlock the mutex before returning.

[airlied: grabbed from drm-next as it fixes something we've seen]

Signed-off-by: Adam J. Richter <adam_richter2004@yahoo.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_dp_mst_topology.c