From: Markus Armbruster Subject: Re: Re: [PATCH] IRQ handling race and spurious IIR read in serial/8250.c Date: Thu, 19 Feb 2009 19:37:53 +0100 Message-ID: <87vdr6z30e.fsf@pike.pond.sub.org> References: <1233800599.5398.0.camel@balanced-tree> <18827.7191.646173.99255@mariner.uk.xensource.com> <1233862446.5676.28.camel@balanced-tree> <1233870772.5676.40.camel@balanced-tree> <18833.40557.119090.48930@mariner.uk.xensource.com> <18834.63479.700909.321686@mariner.uk.xensource.com> <18845.40059.190188.291643@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <18845.40059.190188.291643@mariner.uk.xensource.com> (Ian Jackson's message of "Thu\, 19 Feb 2009 17\:52\:59 +0000") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" , Linux Kernel Mailing List , Anders Kaseorg List-Id: xen-devel@lists.xenproject.org Ian Jackson writes: > I wrote: >> In drivers/serial/8250.c in Linux there are two bugs: >> 1. UART_BUG_TXEN can be spuriously set, due to an IRQ race >> 2. The workaround then applied by the kernel is itself buggy > > Markus Armbruster has also experienced this problem in a Xen > environment and has confirmed that my patch fixes it. Correct. > I think at the very least this change: > >> Proposed initial band-aid fix (against 2.6.28.4): >> >> Do not read IIR in serial8250_start_tx when UART_BUG_TXEN >> >> Reading the IIR clears some oustanding interrupts so it is not safe. >> Instead, simply transmit immediately if the buffer is empty without >> regard to IIR. >> >> Signed-off-by: Ian Jackson > > should be made right away. > > Ian. Patch makes sense to me. Acked-by: Markus Armbruster