* [PATCH 1/2] kernel:fork: fix dependency of hardirqs_enabled and softirqs_enabled
@ 2010-05-04 16:01 tom.leiming
2010-05-04 17:04 ` [tip:core/locking] lockdep, fork: Fix " tip-bot for Ming Lei
0 siblings, 1 reply; 3+ messages in thread
From: tom.leiming @ 2010-05-04 16:01 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel, a.p.zijlstra, Ming Lei
From: Ming Lei <tom.leiming@gmail.com>
The defination of hardirqs_enabled and softirqs_enabled in task_struct
depends on CONFIG_TRACE_IRQFLAGS instead of CONFIG_PROVE_LOCKING.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
kernel/fork.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index 44b0791..038a8fd 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1004,7 +1004,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
rt_mutex_init_task(p);
-#ifdef CONFIG_PROVE_LOCKING
+#ifdef CONFIG_TRACE_IRQFLAGS
DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
#endif
--
1.6.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:core/locking] lockdep, fork: Fix dependency of hardirqs_enabled and softirqs_enabled
2010-05-04 16:01 [PATCH 1/2] kernel:fork: fix dependency of hardirqs_enabled and softirqs_enabled tom.leiming
@ 2010-05-04 17:04 ` tip-bot for Ming Lei
2010-05-04 17:08 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: tip-bot for Ming Lei @ 2010-05-04 17:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, peterz, tglx, tom.leiming, mingo
Commit-ID: 9ca79f1559dc54268bdf129c0b2a1e2bcebeb0d5
Gitweb: http://git.kernel.org/tip/9ca79f1559dc54268bdf129c0b2a1e2bcebeb0d5
Author: Ming Lei <tom.leiming@gmail.com>
AuthorDate: Wed, 5 May 2010 00:01:12 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 4 May 2010 18:33:20 +0200
lockdep, fork: Fix dependency of hardirqs_enabled and softirqs_enabled
The defination of hardirqs_enabled and softirqs_enabled in
task_struct depends on CONFIG_TRACE_IRQFLAGS instead of
CONFIG_PROVE_LOCKING.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1272988872-2347-1-git-send-email-tom.leiming@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/fork.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index 44b0791..038a8fd 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1004,7 +1004,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
rt_mutex_init_task(p);
-#ifdef CONFIG_PROVE_LOCKING
+#ifdef CONFIG_TRACE_IRQFLAGS
DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
#endif
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [tip:core/locking] lockdep, fork: Fix dependency of hardirqs_enabled and softirqs_enabled
2010-05-04 17:04 ` [tip:core/locking] lockdep, fork: Fix " tip-bot for Ming Lei
@ 2010-05-04 17:08 ` Ingo Molnar
0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2010-05-04 17:08 UTC (permalink / raw)
To: mingo, hpa, linux-kernel, peterz, tglx, tom.leiming; +Cc: linux-tip-commits
* tip-bot for Ming Lei <tom.leiming@gmail.com> wrote:
> Commit-ID: 9ca79f1559dc54268bdf129c0b2a1e2bcebeb0d5
> Gitweb: http://git.kernel.org/tip/9ca79f1559dc54268bdf129c0b2a1e2bcebeb0d5
> Author: Ming Lei <tom.leiming@gmail.com>
> AuthorDate: Wed, 5 May 2010 00:01:12 +0800
> Committer: Ingo Molnar <mingo@elte.hu>
> CommitDate: Tue, 4 May 2010 18:33:20 +0200
>
> lockdep, fork: Fix dependency of hardirqs_enabled and softirqs_enabled
>
> The defination of hardirqs_enabled and softirqs_enabled in
> task_struct depends on CONFIG_TRACE_IRQFLAGS instead of
> CONFIG_PROVE_LOCKING.
>
> Signed-off-by: Ming Lei <tom.leiming@gmail.com>
> Acked-by: Peter Zijlstra <peterz@infradead.org>
> LKML-Reference: <1272988872-2347-1-git-send-email-tom.leiming@gmail.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> kernel/fork.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index 44b0791..038a8fd 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -1004,7 +1004,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
>
> rt_mutex_init_task(p);
>
> -#ifdef CONFIG_PROVE_LOCKING
> +#ifdef CONFIG_TRACE_IRQFLAGS
> DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
> DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
> #endif
this looks wrong - and it also causes this warning during bootup, with certain
configs:
ftrace: allocating 24861 entries in 98 pages
------------[ cut here ]------------
WARNING: at kernel/fork.c:1008 copy_process+0x217/0x112c()
Hardware name: System Product Name
Modules linked in:
Pid: 0, comm: swapper Not tainted 2.6.34-rc6-tip-01171-gd3c6011-dirty #3116
Call Trace:
[<ffffffff81039739>] warn_slowpath_common+0x7c/0x94
[<ffffffff81039765>] warn_slowpath_null+0x14/0x16
[<ffffffff81037dc5>] copy_process+0x217/0x112c
[<ffffffff8100386c>] ? call_softirq+0x1c/0x28
[<ffffffff8109e10a>] ? __alloc_pages_nodemask+0x112/0x5fc
[<ffffffff81038e2c>] do_fork+0x152/0x2d1
[<ffffffff815d3074>] ? trace_hardirqs_on_thunk+0x3a/0x3c
[<ffffffff815d3729>] ? restore_args+0x0/0x30
[<ffffffff81008ec1>] kernel_thread+0x70/0x72
[<ffffffff8199e546>] ? kernel_init+0x0/0x1f5
[<ffffffff81003770>] ? kernel_thread_helper+0x0/0x10
[<ffffffff8104e14c>] ? rcu_scheduler_starting+0x38/0x5c
[<ffffffff815a503d>] rest_init+0x21/0x80
[<ffffffff8199ed21>] start_kernel+0x3b8/0x3c3
[<ffffffff8199e2a3>] x86_64_start_reservations+0xb3/0xb7
[<ffffffff8199e38b>] x86_64_start_kernel+0xe4/0xeb
---[ end trace 4eaa2a86a8e2da22 ]---
Setting APIC routing to flat
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-04 17:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 16:01 [PATCH 1/2] kernel:fork: fix dependency of hardirqs_enabled and softirqs_enabled tom.leiming
2010-05-04 17:04 ` [tip:core/locking] lockdep, fork: Fix " tip-bot for Ming Lei
2010-05-04 17:08 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox