lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231761143.4371.0.camel@laptop>
Date:	Mon, 12 Jan 2009 12:52:23 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Alexander Beregalov <a.beregalov@...il.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>, Pavel Machek <pavel@...e.cz>,
	Kernel Testers List <kernel-testers@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, mingo@...e.hu,
	venkatesh.pallipadi@...el.com, shaohua.li@...el.com
Subject: Re: 2.6.28-rc6: hpet: object is on stack, but not annotated

On Mon, 2009-01-12 at 13:40 +0300, Alexander Beregalov wrote:
> 2008/12/4 Pavel Machek <pavel@...e.cz>:
> > On Mon 2008-11-24 19:17:44, Thomas Gleixner wrote:
> >> On Mon, 24 Nov 2008, Alexander Beregalov wrote:
> >>
> >> > 2008/11/24 Alexander Beregalov <a.beregalov@...il.com>:
> >> > > 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)
> >> >
> >> > Revert helps
> >>
> >> That's just a warning about a missing annotation. The commit is fine.
> >
> > You must be using very different metric of what "fine" means than rest
> > of the world.
> >
> > (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?

Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
---
 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));		\


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ