[git pull] lockdep for v2.6.24

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus,

please re-pull

  git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep.git v2.6.24-lockdep

[ I just commited the two new patches to the end of the branch you
  pulled before, and assumed git will be smart enough to not try and
  again merge the patches you pulled before ]

in order to receive:

Peter Zijlstra (2):
      lockdep: fixup the inode dir annotation
      lockdep: fix fault vs irq tracing

 arch/x86/mm/fault_32.c |   10 ++++++++++
 arch/x86/mm/fault_64.c |   10 ++++++++++
 fs/inode.c             |   18 +++++++++---------
 3 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c
index fcb38e7..c0cba93 100644
--- a/arch/x86/mm/fault_32.c
+++ b/arch/x86/mm/fault_32.c
@@ -308,6 +308,16 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
 	int write, si_code;
 	int fault;
 
+#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
+	/*
+	 * We can fault from pretty much anywhere, fix up the IRQ state.
+	 */
+	if (raw_irqs_disabled())
+		trace_hardirqs_off();
+	else
+		trace_hardirqs_on();
+#endif
+
 	/* get the address */
         address = read_cr2();
 
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c
index 54816ad..162bddd 100644
--- a/arch/x86/mm/fault_64.c
+++ b/arch/x86/mm/fault_64.c
@@ -311,6 +311,16 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
 	unsigned long flags;
 	siginfo_t info;
 
+#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
+	/*
+	 * We can fault from pretty much anywhere, fix up the IRQ state.
+	 */
+	if (raw_irqs_disabled())
+		trace_hardirqs_off();
+	else
+		trace_hardirqs_on();
+#endif
+
 	tsk = current;
 	mm = tsk->mm;
 	prefetchw(&mm->mmap_sem);
diff --git a/fs/inode.c b/fs/inode.c
index f97de0a..21dab18 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -568,16 +568,16 @@ EXPORT_SYMBOL(new_inode);
 void unlock_new_inode(struct inode *inode)
 {
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-	struct file_system_type *type = inode->i_sb->s_type;
-	/*
-	 * ensure nobody is actually holding i_mutex
-	 */
-	mutex_destroy(&inode->i_mutex);
-	mutex_init(&inode->i_mutex);
-	if (inode->i_mode & S_IFDIR)
+	if (inode->i_mode & S_IFDIR) {
+		struct file_system_type *type = inode->i_sb->s_type;
+
+		/*
+		 * ensure nobody is actually holding i_mutex
+		 */
+		mutex_destroy(&inode->i_mutex);
+		mutex_init(&inode->i_mutex);
 		lockdep_set_class(&inode->i_mutex, &type->i_mutex_dir_key);
-	else
-		lockdep_set_class(&inode->i_mutex, &type->i_mutex_key);
+	}
 #endif
 	/*
 	 * This is special!  We do not need the spinlock


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux