From: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
To: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Alexander Beregalov
<a.beregalov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Pavel Machek <pavel-AlSwsSmVLrQ@public.gmane.org>,
Kernel Testers List
<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
venkatesh.pallipadi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: 2.6.28-rc6: hpet: object is on stack, but not annotated
Date: Mon, 12 Jan 2009 12:59:34 +0100 [thread overview]
Message-ID: <20090112115934.GA24266@elte.hu> (raw)
In-Reply-To: <1231761143.4371.0.camel@laptop>
* Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
> > > (No, introducing WARN_ON()s is not fine; it spams kerneloops.org at
> > > least...)
> >
> > The warning is still here on 2.6.29-rc1. It taints the kernel.
>
> Does this fix it?
i've applied it to tip/timers/urgent and will send it to Linus if it
passes Alexander's testing too. Below is the prettified commit.
Thanks guys,
Ingo
-------------->
From b1f1006971b6f8d330c6e8ecf240f51c9eb67f4d Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Date: Mon, 12 Jan 2009 12:52:23 +0100
Subject: [PATCH] locking, hpet: annotate false positive warning
Alexander Beregalov reported that this warning is caused by the HPET code:
> hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
> hpet0: 3 comparators, 64-bit 14.318180 MHz counter
> ODEBUG: object is on stack, but not annotated
> ------------[ cut here ]------------
> WARNING: at lib/debugobjects.c:251 __debug_object_init+0x2a4/0x352()
> Bisected down to 26afe5f2fbf06ea0765aaa316640c4dd472310c0
> (x86: HPET_MSI Initialise per-cpu HPET timers)
The commit is fine - but the on-stack workqueue entry needs annotation.
Reported-and-bisected-by: Alexander Beregalov <a.beregalov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org>
Signed-off-by: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
---
arch/x86/kernel/hpet.c | 2 +-
include/linux/workqueue.h | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index cd759ad..bb2e0f0 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -628,7 +628,7 @@ static int hpet_cpuhp_notify(struct notifier_block *n,
switch (action & 0xf) {
case CPU_ONLINE:
- INIT_DELAYED_WORK(&work.work, hpet_work);
+ INIT_DELAYED_WORK_ON_STACK(&work.work, hpet_work);
init_completion(&work.complete);
/* FIXME: add schedule_work_on() */
schedule_delayed_work_on(cpu, &work.work, 0);
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b362911..47151c8 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -118,6 +118,12 @@ struct execute_work {
init_timer(&(_work)->timer); \
} while (0)
+#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
+ do { \
+ INIT_WORK(&(_work)->work, (_func)); \
+ init_timer_on_stack(&(_work)->timer); \
+ } while (0)
+
#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
do { \
INIT_WORK(&(_work)->work, (_func)); \
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Alexander Beregalov <a.beregalov@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Pavel Machek <pavel@suse.cz>,
Kernel Testers List <kernel-testers@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
venkatesh.pallipadi@intel.com, shaohua.li@intel.com
Subject: Re: 2.6.28-rc6: hpet: object is on stack, but not annotated
Date: Mon, 12 Jan 2009 12:59:34 +0100 [thread overview]
Message-ID: <20090112115934.GA24266@elte.hu> (raw)
In-Reply-To: <1231761143.4371.0.camel@laptop>
* Peter Zijlstra <peterz@infradead.org> wrote:
> > > (No, introducing WARN_ON()s is not fine; it spams kerneloops.org at
> > > least...)
> >
> > The warning is still here on 2.6.29-rc1. It taints the kernel.
>
> Does this fix it?
i've applied it to tip/timers/urgent and will send it to Linus if it
passes Alexander's testing too. Below is the prettified commit.
Thanks guys,
Ingo
-------------->
>From b1f1006971b6f8d330c6e8ecf240f51c9eb67f4d Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz@infradead.org>
Date: Mon, 12 Jan 2009 12:52:23 +0100
Subject: [PATCH] locking, hpet: annotate false positive warning
Alexander Beregalov reported that this warning is caused by the HPET code:
> hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
> hpet0: 3 comparators, 64-bit 14.318180 MHz counter
> ODEBUG: object is on stack, but not annotated
> ------------[ cut here ]------------
> WARNING: at lib/debugobjects.c:251 __debug_object_init+0x2a4/0x352()
> Bisected down to 26afe5f2fbf06ea0765aaa316640c4dd472310c0
> (x86: HPET_MSI Initialise per-cpu HPET timers)
The commit is fine - but the on-stack workqueue entry needs annotation.
Reported-and-bisected-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/hpet.c | 2 +-
include/linux/workqueue.h | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index cd759ad..bb2e0f0 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -628,7 +628,7 @@ static int hpet_cpuhp_notify(struct notifier_block *n,
switch (action & 0xf) {
case CPU_ONLINE:
- INIT_DELAYED_WORK(&work.work, hpet_work);
+ INIT_DELAYED_WORK_ON_STACK(&work.work, hpet_work);
init_completion(&work.complete);
/* FIXME: add schedule_work_on() */
schedule_delayed_work_on(cpu, &work.work, 0);
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b362911..47151c8 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -118,6 +118,12 @@ struct execute_work {
init_timer(&(_work)->timer); \
} while (0)
+#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
+ do { \
+ INIT_WORK(&(_work)->work, (_func)); \
+ init_timer_on_stack(&(_work)->timer); \
+ } while (0)
+
#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
do { \
INIT_WORK(&(_work)->work, (_func)); \
next prev parent reply other threads:[~2009-01-12 11:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-24 16:39 2.6.28-rc6: hpet: object is on stack, but not annotated Alexander Beregalov
[not found] ` <a4423d670811240839q54e6b7afxfc49d28b3ea127cb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-24 18:14 ` Alexander Beregalov
2008-11-24 18:14 ` Alexander Beregalov
[not found] ` <a4423d670811241014n2b2192beh931d374bf063894f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-24 18:17 ` Thomas Gleixner
2008-11-24 18:17 ` Thomas Gleixner
[not found] ` <alpine.LFD.2.00.0811241916560.3301-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-12-04 11:16 ` Pavel Machek
2008-12-04 11:16 ` Pavel Machek
[not found] ` <20081204111621.GA2466-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2009-01-12 10:40 ` Alexander Beregalov
2009-01-12 10:40 ` Alexander Beregalov
2009-01-12 11:52 ` Peter Zijlstra
2009-01-12 11:59 ` Ingo Molnar [this message]
2009-01-12 11:59 ` Ingo Molnar
[not found] ` <20090112115934.GA24266-X9Un+BFzKDI@public.gmane.org>
2009-01-12 12:27 ` Alexander Beregalov
2009-01-12 12:27 ` Alexander Beregalov
[not found] ` <a4423d670901120427q502ae9b6uded2e55a91c2a7cc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-01-12 12:33 ` Ingo Molnar
2009-01-12 12:33 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090112115934.GA24266@elte.hu \
--to=mingo-x9un+bfzkdi@public.gmane.org \
--cc=a.beregalov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pavel-AlSwsSmVLrQ@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=venkatesh.pallipadi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.