diff mbox

intel_sdvo_init: trying to register non-static key

Message ID 1391791674.21697.2.camel@intelbox (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak Feb. 7, 2014, 4:47 p.m. UTC
On Fri, 2014-02-07 at 16:49 +0100, Borislav Petkov wrote:
> On Fri, Feb 07, 2014 at 05:32:06PM +0200, Imre Deak wrote:
> > I just realized it's a different issue, since it's on the init path.
> > Also we set the drm device as the parent for the sdvo i2c adapter as
> > opposed to the dp i2c adapter where it's the connector device. So the
> > above patch won't help in Borislav's case.

Ok, not sure why the sdvo initialization fails, but the lockdep warning
is probably fixed by the below patch. Could you try it and send a dmesg
with drm.debug=0xe?

Comments

Borislav Petkov Feb. 10, 2014, 3:49 p.m. UTC | #1
On Fri, Feb 07, 2014 at 06:47:54PM +0200, Imre Deak wrote:
> Ok, not sure why the sdvo initialization fails, but the lockdep
> warning is probably fixed by the below patch. Could you try it and
> send a dmesg with drm.debug=0xe?

Yep, FWIW, the issue is fixed in -rc2, as it got cleared in the other
thread that there's a fix for that on its way to Linus. I.e., this one

commit da9846ae15186d491d6e21ebbb5051e1d3c7f652
Author: Tejun Heo <tj@kernel.org>
Date:   Wed Jan 29 12:04:03 2014 -0500

    kernfs: make kernfs_deactivate() honor KERNFS_LOCKDEP flag

Thanks for addressing this issue so quickly!
diff mbox

Patch

diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 5104cf5..bd6e18b 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -187,19 +187,23 @@  static void kernfs_deactivate(struct kernfs_node
*kn)
 
 	kn->u.completion = (void *)&wait;
 
-	rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_);
+	if (kn->flags & KERNFS_LOCKDEP)
+		rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_);
 	/* atomic_add_return() is a mb(), put_active() will always see
 	 * the updated kn->u.completion.
 	 */
 	v = atomic_add_return(KN_DEACTIVATED_BIAS, &kn->active);
 
 	if (v != KN_DEACTIVATED_BIAS) {
-		lock_contended(&kn->dep_map, _RET_IP_);
+		if (kn->flags & KERNFS_LOCKDEP)
+			lock_contended(&kn->dep_map, _RET_IP_);
 		wait_for_completion(&wait);
 	}
 
-	lock_acquired(&kn->dep_map, _RET_IP_);
-	rwsem_release(&kn->dep_map, 1, _RET_IP_);
+	if (kn->flags & KERNFS_LOCKDEP) {
+		lock_acquired(&kn->dep_map, _RET_IP_);
+		rwsem_release(&kn->dep_map, 1, _RET_IP_);
+	}
 }