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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0908171311260.2782@localhost.localdomain>
Date:	Mon, 17 Aug 2009 13:12:09 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Michael Buesch <mb@...sch.de>
cc:	linux-kernel@...r.kernel.org
Subject: Re: Threaded interrupt handlers broken?

On Mon, 17 Aug 2009, Thomas Gleixner wrote:
> On Mon, 17 Aug 2009, Thomas Gleixner wrote:
> 
> > On Mon, 17 Aug 2009, Michael Buesch wrote:
> > > Ok, I added some more debugging code:
> > > http://bu3sch.de/patches/wireless-testing/20090817-1219/patches/001-hack-threaded-irqs.patch
> > > 
> > > Here's the result:
> > > http://bu3sch.de/misc/dmesg2
> > >
> > > Is it possible that the irq_to_desc() in irq_thread() fails and the
> > > resulting desc pointer points to something random? That could
> > > probably explain why the bit is set and why the spinlock is
> > > uninitialized. But it would not explain why desc->lock would still
> > > work... Maybe irq_to_desc() returns a descriptor to another irq (!=
> > > 52)?
> > 
> > That would cause the whole irq code to fail. Can you send/upload your
> > .config please ?
> 
> Also just add printk("desc: %p \n", desc); to the various places to
> make sure that your pointers are correct.

Gah. I think I found it.

I wonder why nobody else ever tripped over this.

Thanks,

	tglx
---
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index d222515..223b062 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -607,7 +607,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
 		 */
 		get_task_struct(t);
 		new->thread = t;
-		wake_up_process(t);
 	}
 
 	/*
@@ -712,6 +711,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
 	new->dir = NULL;
 	register_handler_proc(irq, new);
 
+	if (new->thread)
+		wake_up_process(new->thread);
+
 	return 0;
 
 mismatch:
--
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