* [git pull] lockdep for v2.6.24
@ 2007-10-15 17:30 Peter Zijlstra
2007-10-16 1:14 ` Linus Torvalds
0 siblings, 1 reply; 5+ messages in thread
From: Peter Zijlstra @ 2007-10-15 17:30 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, Andrew Morton, Ingo Molnar
Linus,
please pull the lockdep tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep.git v2.6.24-lockdep
Ingo suggested to add me to the MAINTAINERS file for lockdep/lockstat.
The rest of the pull contains a few fixes, a few annotations and a new
'feature'. The new thing is ensuring we don't hold any locks when returning to
userspace. This will give a much earlier warning about imbalanced lock
acquisitions.
Peter
---
Gregory Haskins (1):
lockdep: fix mismatched lockdep_depth/curr_chain_hash
Heiko Carstens (1):
lockdep: s390: connect the sysexit hook
Peter Zijlstra (10):
lockdep: maintainers
lockdep: fixup mutex annotations
lockdep: syscall exit check
lockdep: i386: connect the sysexit hook
lockdep: x86_64: connect the sysexit hook
lockdep: annotate journal_start()
lockdep: annotate rcu_read_{,un}lock{,_bh}
lockdep: annotate kprobes irq fiddling
lockdep: per filesystem inode lock class
lockdep: annotate dir vs file i_mutex
Tim Pepper (1):
lockdep: Avoid /proc/lockdep & lock_stat infinite output
MAINTAINERS | 9 ++++++
arch/s390/kernel/entry.S | 12 ++++++++
arch/s390/kernel/entry64.S | 9 ++++++
arch/x86/kernel/entry_32.S | 4 +++
arch/x86/kernel/entry_64.S | 23 +++++++--------
arch/x86/kernel/kprobes_32.c | 7 +++++
arch/x86/kernel/kprobes_64.c | 7 +++++
arch/x86/lib/thunk_64.S | 4 +++
fs/inode.c | 24 ++++++++++++++--
fs/jbd/transaction.c | 9 ++++++
include/asm-x86/irqflags_32.h | 13 +++++++++
include/asm-x86/irqflags_64.h | 14 +++++++++
include/linux/fs.h | 6 ++++
include/linux/jbd.h | 5 +++
include/linux/lockdep.h | 9 ++++++
include/linux/mutex.h | 9 ++++--
include/linux/rcupdate.h | 14 +++++++++
kernel/lockdep.c | 26 ++++++++++++++---
kernel/lockdep_proc.c | 61 ++++++++++++++++++++++++++++-------------
kernel/mutex.c | 35 +++++++++++++----------
kernel/rcupdate.c | 8 +++++
21 files changed, 251 insertions(+), 57 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [git pull] lockdep for v2.6.24
2007-10-15 17:30 [git pull] lockdep for v2.6.24 Peter Zijlstra
@ 2007-10-16 1:14 ` Linus Torvalds
2007-10-16 4:47 ` [patch] lockdep: fixup the inode dir annotation Ingo Molnar
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Linus Torvalds @ 2007-10-16 1:14 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: linux-kernel, Andrew Morton, Ingo Molnar
On Mon, 15 Oct 2007, Peter Zijlstra wrote:
>
> please pull the lockdep tree from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep.git v2.6.24-lockdep
Hmm. I'm now getting
WARNING: at kernel/lockdep.c:700 look_up_lock_class()
Call Trace:
[<ffffffff8105562a>] __lock_acquire+0x15f/0xc92
[<ffffffff810a5804>] do_lookup+0x83/0x1b0
[<ffffffff8105654a>] lock_acquire+0x5a/0x73
[<ffffffff810a5804>] do_lookup+0x83/0x1b0
[<ffffffff81052b59>] debug_mutex_lock_common+0x16/0x23
[<ffffffff81347d26>] mutex_lock_nested+0x10c/0x2b0
[<ffffffff810a5804>] do_lookup+0x83/0x1b0
[<ffffffff810a7b89>] __link_path_walk+0x924/0xde9
[<ffffffff810a80a6>] link_path_walk+0x58/0xe0
[<ffffffff81348ef6>] _spin_unlock+0x17/0x20
[<ffffffff8109cc31>] get_unused_fd_flags+0x115/0x126
[<ffffffff810a8432>] do_path_lookup+0x1ae/0x229
[<ffffffff810a8e3d>] __path_lookup_intent_open+0x56/0x96
[<ffffffff810a8fe0>] open_namei+0x7d/0x66c
[<ffffffff8109ce9f>] do_filp_open+0x1c/0x38
[<ffffffff81348ef6>] _spin_unlock+0x17/0x20
[<ffffffff8109cc31>] get_unused_fd_flags+0x115/0x126
[<ffffffff8109cf01>] do_sys_open+0x46/0xc3
[<ffffffff8100bc3e>] system_call+0x7e/0x83
which seems to be new..
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
* [patch] lockdep: fixup the inode dir annotation
2007-10-16 1:14 ` Linus Torvalds
@ 2007-10-16 4:47 ` Ingo Molnar
2007-10-16 7:46 ` [git pull] lockdep for v2.6.24 Peter Zijlstra
2007-10-16 19:23 ` Peter Zijlstra
2 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2007-10-16 4:47 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Peter Zijlstra, linux-kernel, Andrew Morton
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > please pull the lockdep tree from:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep.git
> > v2.6.24-lockdep
>
> Hmm. I'm now getting
>
> WARNING: at kernel/lockdep.c:700 look_up_lock_class()
it triggered here too - the patch from Peter below was tested overnight
and seems to do the trick for me.
Ingo
--------------------->
Subject: lockdep: fixup the inode dir annotation
A slight oversight tripped lockdep debugging code, each lockdep
class should have but a single init site.
Rearange the code to make this true.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
fs/inode.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
Index: linux/fs/inode.c
===================================================================
--- linux.orig/fs/inode.c
+++ linux/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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [git pull] lockdep for v2.6.24
2007-10-16 1:14 ` Linus Torvalds
2007-10-16 4:47 ` [patch] lockdep: fixup the inode dir annotation Ingo Molnar
@ 2007-10-16 7:46 ` Peter Zijlstra
2007-10-16 19:23 ` Peter Zijlstra
2 siblings, 0 replies; 5+ messages in thread
From: Peter Zijlstra @ 2007-10-16 7:46 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, Andrew Morton, Ingo Molnar
On Mon, 2007-10-15 at 18:14 -0700, Linus Torvalds wrote:
>
> On Mon, 15 Oct 2007, Peter Zijlstra wrote:
> >
> > please pull the lockdep tree from:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep.git v2.6.24-lockdep
>
> Hmm. I'm now getting
>
> WARNING: at kernel/lockdep.c:700 look_up_lock_class()
>
> Call Trace:
> [<ffffffff8105562a>] __lock_acquire+0x15f/0xc92
> [<ffffffff810a5804>] do_lookup+0x83/0x1b0
> [<ffffffff8105654a>] lock_acquire+0x5a/0x73
> [<ffffffff810a5804>] do_lookup+0x83/0x1b0
> [<ffffffff81052b59>] debug_mutex_lock_common+0x16/0x23
> [<ffffffff81347d26>] mutex_lock_nested+0x10c/0x2b0
> [<ffffffff810a5804>] do_lookup+0x83/0x1b0
> [<ffffffff810a7b89>] __link_path_walk+0x924/0xde9
> [<ffffffff810a80a6>] link_path_walk+0x58/0xe0
> [<ffffffff81348ef6>] _spin_unlock+0x17/0x20
> [<ffffffff8109cc31>] get_unused_fd_flags+0x115/0x126
> [<ffffffff810a8432>] do_path_lookup+0x1ae/0x229
> [<ffffffff810a8e3d>] __path_lookup_intent_open+0x56/0x96
> [<ffffffff810a8fe0>] open_namei+0x7d/0x66c
> [<ffffffff8109ce9f>] do_filp_open+0x1c/0x38
> [<ffffffff81348ef6>] _spin_unlock+0x17/0x20
> [<ffffffff8109cc31>] get_unused_fd_flags+0x115/0x126
> [<ffffffff8109cf01>] do_sys_open+0x46/0xc3
> [<ffffffff8100bc3e>] system_call+0x7e/0x83
>
> which seems to be new..
Yeah, Ingo just told me about that too :-(
Seems I dropped a patch in my test runs.. Anyway, pushed a fix into the
above tree.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [git pull] lockdep for v2.6.24
2007-10-16 1:14 ` Linus Torvalds
2007-10-16 4:47 ` [patch] lockdep: fixup the inode dir annotation Ingo Molnar
2007-10-16 7:46 ` [git pull] lockdep for v2.6.24 Peter Zijlstra
@ 2007-10-16 19:23 ` Peter Zijlstra
2 siblings, 0 replies; 5+ messages in thread
From: Peter Zijlstra @ 2007-10-16 19:23 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, Andrew Morton, Ingo Molnar
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-16 19:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-15 17:30 [git pull] lockdep for v2.6.24 Peter Zijlstra
2007-10-16 1:14 ` Linus Torvalds
2007-10-16 4:47 ` [patch] lockdep: fixup the inode dir annotation Ingo Molnar
2007-10-16 7:46 ` [git pull] lockdep for v2.6.24 Peter Zijlstra
2007-10-16 19:23 ` Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox