LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@linux-foundation.org>,
Chuck Ebbert <cebbert@redhat.com>, Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org, stable@kernel.org,
Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
"Theodore Ts'o" <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
alan@lxorguk.ukuu.org.uk
Subject: Re: [patch 00/21] 2.6.19-stable review
Date: Wed, 21 Feb 2007 15:45:54 -0700 [thread overview]
Message-ID: <m1odnnyvrx.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0702211208500.4043@woody.linux-foundation.org> (Linus Torvalds's message of "Wed, 21 Feb 2007 12:09:38 -0800 (PST)")
Chuck Ebbert <cebbert@redhat.com> writes:
> We've tested it and found no problems so far. It's definitely
> better than what's there now. :)
Linus Torvalds <torvalds@linux-foundation.org> writes:
> Would be good to have Eric also ack them as safe and obvious.
Andi Kleen <ak@suse.de> writes:
> I didn't think the problem was serious enough for a backport. Do we have
> user reports?
>
> It's certainly not trivial obvious patches.
>
> Eric, what is your opinion?
Bug reports:
I have seen a couple of user reports and heard about a few more. Given
that Chuck Ebbert appears to have tested them I'm guessing redhat has
seen a couple of reports as well. One of the issues is that in
some cases you can be susceptible and go for weeks without hitting
this, so the bug reports aren't likely to come back fast. So this is
a long term stability issue.
Even if we just put in my tiny fix that allows us to generally
survive this condition in stable, it prints a nasty warning message
so I expect people will want a more complete fix.
Vulnerability:
I believe it is possible to trigger this bug on any SMP machine.
Obviousness:
The first patch is obvious, but of course that isn't the interesting
bit.
The second patch is still fairly simple, and it appears to have
undergone testing from people besides myself.
So in the interest of a timely if not perfect fix I think it is a
good patch. In particular I do not see any area where it would makes
things worse.
Bugs:
There is one small issue that is probably worth fixing.
apic_in_service_vector only works correctly because we never have
more than one local apic irq in service at the same time, (we keep
irqs disabled during all of the interrupt routines). The appended
incremental patch addresses that.
Outstanding Issues:
The big outstanding issue I am currently working on is that in my
testing I have found evidence to suggest that ioapics do not strictly
follow the pci ordering rules, so exactly when the last interrupt
sent before we masked the interrupt at the interrupt controller will
arrive is in question. So to really be safe we cannot tear down the
data structures for handling the interrupt in the old location until
after we have seen the next interrupt showing up in the new location.
I don't know if it is possible to for the issue I have just described
to cause problems in practice. I intend to fix this for 2.6.21 if the
patch will be accepted. I have a patch that appears to work
that I am currently testing now.
I don't think my more complete fix will be as simple to backport
because it is a more intrusive patch.
Subject: [PATCH] x86_64 irq: Make apic_in_service_vector robust
Currently apic_in_service_vector because it scans isr in the wrong
direction only works reliably because we never enable interrupts
during an interrupt handler. I had the apic priorities backwards
in my head when I wrote it :(
It turns out that we have already saved off the vector we are servicing
in the irq regs so use that instead to make the code simpler and
more robust.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
arch/x86_64/kernel/io_apic.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index fc42340..b6f9896 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -1395,15 +1395,9 @@ static int ioapic_retrigger_irq(unsigned int irq)
static unsigned apic_in_service_vector(void)
{
- unsigned isr, vector;
+ unsigned vector;
/* Figure out which vector we are servicing */
- for (vector = FIRST_EXTERNAL_VECTOR; vector < FIRST_SYSTEM_VECTOR; vector += 32) {
- isr = apic_read(APIC_ISR + ((vector/32) * 0x10));
- if (isr)
- break;
- }
- /* Find the low bits of the vector we are servicing */
- vector += __ffs(isr);
+ vector = ~get_irq_regs()->orig_rax;
return vector;
}
--
1.5.0.g53756
next prev parent reply other threads:[~2007-02-21 22:49 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070221012758.925122216@mini.kroah.org>
2007-02-21 1:36 ` Greg KH
2007-02-21 1:36 ` [patch 01/21] V4L: cx88: Fix lockup on suspend Greg KH
2007-02-22 1:00 ` Chuck Ebbert
2007-02-22 1:14 ` Michael Krufky
2007-02-21 1:36 ` [patch 02/21] V4L: Fix quickcam communicator driver for big endian architectures Greg KH
2007-02-21 1:36 ` [patch 03/21] V4L: fix ks0127 status flags Greg KH
2007-02-21 1:36 ` [patch 04/21] V4L: tveeprom: autodetect LG TAPC G701D as tuner type 37 Greg KH
2007-02-21 1:37 ` [patch 05/21] V4L: buf_qbuf: fix videobuf_queue->stream corruption and lockup Greg KH
2007-02-21 1:37 ` [patch 06/21] net/smc911x: match up spin lock/unlock Greg KH
2007-02-21 1:37 ` [patch 07/21] rtc-pcf8563: detect polarity of century bit automatically Greg KH
2007-02-21 1:37 ` [patch 08/21] aio: fix buggy put_ioctx call in aio_complete - v2 Greg KH
2007-02-21 1:37 ` [patch 09/21] x86_64: fix 2.6.18 regression - PTRACE_OLDSETOPTIONS should be accepted Greg KH
2007-02-21 1:37 ` [patch 10/21] ide: fix drive side 80c cable check Greg KH
2007-02-21 1:37 ` [patch 11/21] pata_amd: fix an obvious bug in cable detection Greg KH
2007-02-21 1:37 ` [patch 12/21] bcm43xx: Fix for oops on resume Greg KH
2007-02-21 1:38 ` [patch 13/21] bcm43xx: Fix for oops on ampdu status Greg KH
2007-02-21 1:38 ` [patch 14/21] usb-audio: work around wrong frequency in CM6501 descriptors Greg KH
2007-02-21 1:38 ` [patch 15/21] usbaudio - Fix Oops with broken usb descriptors Greg KH
2007-02-21 1:38 ` [patch 16/21] usbaudio - Fix Oops with unconventional sample rates Greg KH
2007-02-21 1:38 ` [patch 17/21] Use different constraint for gcc < 4.1 in bitops Greg KH
2007-02-21 1:38 ` [patch 18/21] prism54: correct assignment of DOT1XENABLE in WE-19 codepaths Greg KH
2007-02-21 1:38 ` [patch 19/21] net, 8139too.c: fix netpoll deadlock Greg KH
2007-02-21 1:38 ` [patch 20/21] Keys: Fix key serial number collision handling Greg KH
2007-02-21 1:39 ` [patch 21/21] knfsd: Fix a race in closing NFSd connections Greg KH
2007-02-21 13:36 ` [patch 00/21] 2.6.19-stable review Stefan Richter
2007-02-21 13:37 ` Stefan Richter
2007-03-09 5:35 ` Adrian Bunk
2007-02-21 16:38 ` Chuck Ebbert
2007-02-21 16:50 ` Chuck Ebbert
2007-02-21 19:31 ` Chuck Ebbert
2007-02-21 19:47 ` Andrew Morton
2007-02-21 20:09 ` Linus Torvalds
2007-02-21 22:45 ` Eric W. Biederman [this message]
2007-02-28 6:37 ` Eric W. Biederman
2007-02-28 8:51 ` Zwane Mwaikambo
2007-02-28 12:28 ` Eric W. Biederman
2007-02-28 19:52 ` [stable] " Greg KH
2007-02-28 23:25 ` Eric W. Biederman
2007-02-21 20:13 ` Eric W. Biederman
2007-02-21 20:21 ` Chuck Ebbert
2007-02-21 22:19 ` Andi Kleen
2007-02-21 22:20 ` Andi Kleen
2007-02-21 22:39 ` Chuck Ebbert
2007-02-22 1:19 ` Andi Kleen
2007-02-21 20:39 ` Greg KH
2007-02-21 20:44 ` Chuck Ebbert
2007-02-21 22:33 ` Chuck Ebbert
2007-02-21 22:35 ` Chuck Ebbert
2007-02-21 22:43 ` Chuck Ebbert
2007-02-22 16:09 ` Chuck Ebbert
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=m1odnnyvrx.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cebbert@redhat.com \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=greg@kroah.com \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkrufky@linuxtv.org \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=zwane@arm.linux.org.uk \
--subject='Re: [patch 00/21] 2.6.19-stable review' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).