WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH] IRQ handling race and spurious IIR read in s

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] IRQ handling race and spurious IIR read in serial/8250.c
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Thu, 19 Feb 2009 19:37:53 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Anders Kaseorg <andersk@xxxxxxx>
Delivery-date: Thu, 19 Feb 2009 10:38:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18845.40059.190188.291643@xxxxxxxxxxxxxxxxxxxxxxxx> (Ian Jackson's message of "Thu\, 19 Feb 2009 17\:52\:59 +0000")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1233800599.5398.0.camel@balanced-tree> <18827.7191.646173.99255@xxxxxxxxxxxxxxxxxxxxxxxx> <1233862446.5676.28.camel@balanced-tree> <1233870772.5676.40.camel@balanced-tree> <18833.40557.119090.48930@xxxxxxxxxxxxxxxxxxxxxxxx> <alpine.DEB.2.00.0902101249181.20723@xxxxxxxxxxxxxxxxxxx> <18834.63479.700909.321686@xxxxxxxxxxxxxxxxxxxxxxxx> <18845.40059.190188.291643@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)
Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> 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 <ian.jackson@xxxxxxxxxxxxx>
>
> should be made right away.
>
> Ian.

Patch makes sense to me.

Acked-by: Markus Armbruster <armbru@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel