public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org
Cc: mingo@redhat.com
Subject: Serial Oopsen caused by global IRQ chanes
Date: Sat, 27 Jul 2002 19:11:19 +0100	[thread overview]
Message-ID: <20020727191119.C32766@flint.arm.linux.org.uk> (raw)

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


             reply	other threads:[~2002-07-27 18:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-27 18:11 Russell King [this message]
2002-07-27 18:19 ` Serial Oopsen caused by global IRQ chanes 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

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=20020727191119.C32766@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox