From: David Miller <davem@davemloft.net>
To: ben@decadent.org.uk
Cc: p_gortmaker@yahoo.com, netdev@vger.kernel.org,
566522@bugs.debian.org, sql7@wp.pl
Subject: Re: [PATCH] 3c503: Fix IRQ probing
Date: Wed, 07 Apr 2010 20:56:18 -0700 (PDT) [thread overview]
Message-ID: <20100407.205618.201234628.davem@davemloft.net> (raw)
In-Reply-To: <1270398809.8341.47.camel@localhost>
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 04 Apr 2010 17:33:29 +0100
> The driver attempts to select an IRQ for the NIC automatically by
> testing which of the supported IRQs are available and then probing
> each available IRQ with probe_irq_{on,off}(). There are obvious race
> conditions here, besides which:
> 1. The test for availability is done by passing a NULL handler, which
> now always returns -EINVAL, thus the device cannot be opened:
> <http://bugs.debian.org/566522>
> 2. probe_irq_off() will report only the first ISA IRQ handled,
> potentially leading to a false negative.
>
> There was another bug that meant it ignored all error codes from
> request_irq() except -EBUSY, so it would 'succeed' despite this
> (possibly causing conflicts with other ISA devices). This was fixed
> by ab08999d6029bb2c79c16be5405d63d2bedbdfea 'WARNING: some
> request_irq() failures ignored in el2_open()', which exposed bug 1.
>
> This patch:
> 1. Replaces the use of probe_irq_{on,off}() with a real interrupt handler
> 2. Adds a delay before checking the interrupt-seen flag
> 3. Disables interrupts on all failure paths
> 4. Distinguishes error codes from the second request_irq() call,
> consistently with the first
>
> Compile-tested only.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This looks logically fine, but I'm tossing this into net-next-2.6
because of the limited tester space for this driver.
Thanks Ben.
prev parent reply other threads:[~2010-04-08 3:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-04 16:33 [PATCH] 3c503: Fix IRQ probing Ben Hutchings
2010-04-08 3:56 ` David Miller [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=20100407.205618.201234628.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=566522@bugs.debian.org \
--cc=ben@decadent.org.uk \
--cc=netdev@vger.kernel.org \
--cc=p_gortmaker@yahoo.com \
--cc=sql7@wp.pl \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.