mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
To: "Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [BUG: kernel/irq/proc.c] unprotected iteration over the IRQ action list in name_unique()
Date: Thu, 15 Mar 2007 10:53:13 +0100	[thread overview]
Message-ID: <b647ffbd0703150253q36d19c4ej8fe19ed644520017@mail.gmail.com> (raw)
In-Reply-To: <b647ffbd0703140926v1aa861alecd1a2eb4c6d0f5d@mail.gmail.com>

On 14/03/07, Dmitry Adamushko <dmitry.adamushko@gmail.com> wrote:

> 1-st issue:  unprotected iteration over the IRQ action list in name_unique()
>
>
> the racing sequences:
>
> [ 1 ]  request_irq() -> setup_irq() -> register_handler_proc() ->
> name_unique() -> iterate over the action list (*)
>
> setup_irq() releases a desc->lock before calling register_handler_proc().
>
> [ 2 ]  free_irq() -> delete some element while (*) is still in progress -> bum!

"delete" == remove from the list + kfree() as synchronize_irq() is not
going to prevent it for obvious reasons.

Of course, request_irq() and free_irq() are called for the same
/shared/ irq line but for /different/ handlers.

Looks too obvious to be true. I already expected someone prooving me
wrong, at the very least by pointing out a special option of vim to
activate some hidden synchronization code :o)


-- 
Best regards,
Dmitry Adamushko

      reply	other threads:[~2007-03-15  9:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14 16:26 Dmitry Adamushko
2007-03-15  9:53 ` Dmitry Adamushko [this message]

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=b647ffbd0703150253q36d19c4ej8fe19ed644520017@mail.gmail.com \
    --to=dmitry.adamushko@gmail.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®