4 messages in com.xensource.lists.xen-develRe: [Xen-devel] [PATCH] linux: fix gr...
FromSent OnAttachments
Michael Abd-El-Malek30 Mar 2008 20:42.a
Keir Fraser31 Mar 2008 02:52 
Mark McLoughlin03 Apr 2008 06:26 
Jeremy Fitzhardinge03 Apr 2008 07:36 
Subject:Re: [Xen-devel] [PATCH] linux: fix grant table bug
From:Keir Fraser (keir@eu.citrix.com)
Date:03/31/2008 02:52:41 AM
List:com.xensource.lists.xen-devel

On 31/3/08 04:42, "Michael Abd-El-Malek" <mabd@cmu.edu> wrote:

A PV OS has two grant table data structures: the grant table itself and a free list. The free list is composed of an array of pages, which grow dynamically as the guest OS requires more grants. While the grant table contains 8-byte entries, the free list contains 4-byte entries. So we have half as many pages in the free list than in the grant table.

There was a bug in the free list allocation code. The free list was indexed as if it was the same size as the grant table. But it's only half as large. So memory got corrupted, and I was seeing crashes in the slab allocator later on.

Nice catch. That code is a bit confusing!

-- Keir