public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Serial Oopsen caused by global IRQ chanes
@ 2002-07-27 18:11 Russell King
  2002-07-27 18:19 ` Russell King
  2002-07-27 18:43 ` [patch] " Ingo Molnar
  0 siblings, 2 replies; 7+ messages in thread
From: Russell King @ 2002-07-27 18:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo

Hi,

Two people have now reported to me a couple of oopsen which appear to be
caused by a change in 2.5.29 to synchronize_irq(), which I believe has
made synchronize_irq() useless.

In effect, we no longer guarantee that any IRQ handlers for a particular
IRQ will have finished running by the time free_irq() returns.  So, code
which has:

int bar;
int *foo = &bar;

irq_handler()
{
	*foo = 0;
}

void module_exit(void)
{
	free_irq(irq, NULL);
	foo = NULL;
}

is currently broken in two ways:

1. it's possible for irq_handler to dereference foo on another CPU _after_
   free_irq has returned.
2. it's possible for the module to be unloaded while the irq_handler is
   still running on another CPU.

Would someone else (Ingo?) like to comment on the above please?
The serial code regularly trips up because of this on SMP boxen.

Thanks.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-07-27 23:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-27 18:11 Serial Oopsen caused by global IRQ chanes Russell King
2002-07-27 18:19 ` Russell King
2002-07-27 18:21   ` Ingo Molnar
2002-07-27 18:43 ` [patch] " Ingo Molnar
2002-07-27 22:36   ` William Lee Irwin III
2002-07-27 23:01     ` William Lee Irwin III
2002-07-27 23:27       ` William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox