]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Drop grab fpriv->fbs_lock in drm_fb_release
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Sep 2014 19:51:06 +0000 (21:51 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 25 Sep 2014 15:13:40 +0000 (17:13 +0200)
commit17374ea28862981110d44c5daf2f17e6d4ffac10
treef511f76878ea67939db24d1cc622cd6ef81a282d
parentc41a706a20e3c8098dfc19f12cc23b2559680f51
drm: Drop grab fpriv->fbs_lock in drm_fb_release

Paulo Zanoni reported a lockdep splat with a locking inversion between
fpriv->fbs_lock and the modeset locks. This issue was introduced in

commit 261c7eb782ab7b94219a66eef2be8d82d8d14f4f
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Sep 12 17:07:32 2014 +0200

    drm: Fixup locking for universal cursor planes

This here is actually one of the rare cases where lockdep hits a false
positive: The deadlock only happens in drm_fb_release, which cleans up
the file private structure when all the references are gone. So the
locking is the very last one and no one else can deadlock. It also
doesn't protect anything at all, since all ioctls are guaranteed to
have returned at this point - otherwise they'd still hold a reference
on the file.

So let's just drop it and replace it with a big comment.

Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Paulo Zanoni <przanoni@gmail.com>
Reported-and-Tested-by: Paulo Zanoni <przanoni@gmail.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/drm_crtc.c