[kernel/f17] Apply patch to fix autofs4 lockdep splat (rhbz 714828)

Josh Boyer jwboyer at fedoraproject.org
Tue Feb 14 01:49:34 UTC 2012


commit 2d7f1ba183550bfd19e190a6fefe3737153a8b18
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Mon Feb 13 20:48:11 2012 -0500

    Apply patch to fix autofs4 lockdep splat (rhbz 714828)

 autofs4-lockdep.patch |   84 +++++++++++++++++++++++++++++++++++++++++++++++++
 kernel.spec           |    9 +++++
 2 files changed, 93 insertions(+), 0 deletions(-)
---
diff --git a/autofs4-lockdep.patch b/autofs4-lockdep.patch
new file mode 100644
index 0000000..fe4d650
--- /dev/null
+++ b/autofs4-lockdep.patch
@@ -0,0 +1,84 @@
+Path: news.gmane.org!not-for-mail
+From: Ian Kent <raven at themaw.net>
+Newsgroups: gmane.linux.kernel
+Subject: [PATCH] autofs4 - fix lockdep splat in autofs
+Date: Mon, 22 Aug 2011 11:52:28 +0800
+Lines: 35
+Approved: news at gmane.org
+Message-ID: <20110822035228.13189.62994.stgit at perseus.themaw.net>
+NNTP-Posting-Host: lo.gmane.org
+Mime-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 7bit
+X-Trace: dough.gmane.org 1313985730 20409 80.91.229.12 (22 Aug 2011 04:02:10 GMT)
+X-Complaints-To: usenet at dough.gmane.org
+NNTP-Posting-Date: Mon, 22 Aug 2011 04:02:10 +0000 (UTC)
+Cc: Kernel Mailing List <linux-kernel at vger.kernel.org>,
+	Steven Rostedt <rostedt at goodmis.org>
+To: Al Viro <viro at ZenIV.linux.org.uk>
+Original-X-From: linux-kernel-owner at vger.kernel.org Mon Aug 22 06:02:05 2011
+Return-path: <linux-kernel-owner at vger.kernel.org>
+Envelope-to: glk-linux-kernel-3 at lo.gmane.org
+Original-Received: from vger.kernel.org ([209.132.180.67])
+	by lo.gmane.org with esmtp (Exim 4.69)
+	(envelope-from <linux-kernel-owner at vger.kernel.org>)
+	id 1QvLi6-00059I-P9
+	for glk-linux-kernel-3 at lo.gmane.org; Mon, 22 Aug 2011 06:02:03 +0200
+Original-Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
+	id S1750951Ab1HVEBw (ORCPT <rfc822;glk-linux-kernel-3 at m.gmane.org>);
+	Mon, 22 Aug 2011 00:01:52 -0400
+Original-Received: from outbound.icp-qv1-irony-out2.iinet.net.au ([203.59.1.107]:23283
+	"EHLO outbound.icp-qv1-irony-out2.iinet.net.au" rhost-flags-OK-OK-OK-OK)
+	by vger.kernel.org with ESMTP id S1750806Ab1HVEBu (ORCPT
+	<rfc822;linux-kernel at vger.kernel.org>);
+	Mon, 22 Aug 2011 00:01:50 -0400
+X-Greylist: delayed 554 seconds by postgrey-1.27 at vger.kernel.org; Mon, 22 Aug 2011 00:01:50 EDT
+X-IronPort-Anti-Spam-Filtered: true
+X-IronPort-Anti-Spam-Result: Av4EADDSUU7LO5kB/2dsb2JhbABBhEujSHeBQAEpBFIoCAUCGA4CSRYTrRSQOYEshAyBEASHXpBgi1k
+X-IronPort-AV: E=Sophos;i="4.68,261,1312128000"; 
+   d="scan'208";a="765105065"
+Original-Received: from unknown (HELO perseus.themaw.net) ([203.59.153.1])
+  by outbound.icp-qv1-irony-out2.iinet.net.au with ESMTP; 22 Aug 2011 11:52:32 +0800
+User-Agent: StGIT/0.14.3
+Original-Sender: linux-kernel-owner at vger.kernel.org
+Precedence: bulk
+List-ID: <linux-kernel.vger.kernel.org>
+X-Mailing-List: linux-kernel at vger.kernel.org
+Xref: news.gmane.org gmane.linux.kernel:1182197
+Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1182197>
+
+From: Steven Rostedt <rostedt at goodmis.org>
+
+When recursing down the locks when traversing a tree/list in
+get_next_positive_dentry() or get_next_positive_subdir() a lock can
+change from being nested to being a parent which breaks lockdep. This
+patch tells lockdep about what we did.
+
+Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
+Acked-by: Ian Kent <raven at themaw.net>
+---
+
+ fs/autofs4/expire.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
+index 450f529..1feb68e 100644
+--- a/fs/autofs4/expire.c
++++ b/fs/autofs4/expire.c
+@@ -124,6 +124,7 @@ start:
+ 	/* Negative dentry - try next */
+ 	if (!simple_positive(q)) {
+ 		spin_unlock(&p->d_lock);
++		lock_set_subclass(&q->d_lock.dep_map, 0, _RET_IP_);
+ 		p = q;
+ 		goto again;
+ 	}
+@@ -186,6 +187,7 @@ again:
+ 	/* Negative dentry - try next */
+ 	if (!simple_positive(ret)) {
+ 		spin_unlock(&p->d_lock);
++		lock_set_subclass(&ret->d_lock.dep_map, 0, _RET_IP_);
+ 		p = ret;
+ 		goto again;
+ 	}
+
diff --git a/kernel.spec b/kernel.spec
index a8f306f..25edf36 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -755,6 +755,9 @@ Patch21234: Bluetooth-Remove-bogus-inline-decl-from-l2cap_chan_connect.patch
 #rhbz 754518
 Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
 
+#rhbz 714828
+Patch21236: autofs4-lockdep.patch
+
 # compat-wireless patches
 Patch50000: compat-wireless-config-fixups.patch
 Patch50001: compat-wireless-pr_fmt-warning-avoidance.patch
@@ -1458,6 +1461,9 @@ ApplyPatch Bluetooth-Remove-bogus-inline-decl-from-l2cap_chan_connect.patch
 #rhbz 754518
 ApplyPatch scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
 
+#rhbz 714828
+ApplyPatch autofs4-lockdep.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2338,6 +2344,9 @@ fi
 #    '-'      |  |
 #              '-'
 %changelog
+* Mon Feb 13 2012 Josh Boyer <jwboyer at redhat.com>
+- Apply patch to fix autofs4 lockdep splat (rhbz 714828)
+
 * Mon Feb 13 2012 Josh Boyer <jwboyer at redhat.com> - 3.3.0-0.rc3.git4.1
 - Linux 3.3-rc3-git4 (upstream 3ec1e88b33a3bdd852ce8e014052acec7a9da8b5)
 


More information about the scm-commits mailing list