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] [PATCH] fast_flush_area in blkback.c still broken after

To: harry <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] fast_flush_area in blkback.c still broken after 55194bd55b86
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 7 Nov 2005 12:01:12 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 07 Nov 2005 11:56:06 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1131362397.5955.11.camel@xxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1131362397.5955.11.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 7 Nov 2005, at 11:19, harry wrote:

I think you need this patch otherwise you will be passing uninitialised
data from the stack to GNTTABOP_unmap_grant_ref in fast_flush_area.

Also, I think the memset of the pending_grant_handles array should
happen before you start using them so I moved it to before
blkif_xenbus_init.  I'm not sure if this is necessary or it might
possibly have to go even earlier.

Two good catches. In fact the initialisation of pending_grant_handles was more seriously broken -- the use of memset was bogus since the array elements are u16's not u8's. So only half the array was being initialised, and high byte of the initialiser value was discarded. Where do we find these programmers.... :-)

 -- Keir


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

<Prev in Thread] Current Thread [Next in Thread>