|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Fix BUG in alloc_heap_pages
On 25/9/06 15:48, "Amos Waterland" <apw@xxxxxxxxxx> wrote:
> I believe that the failing sequence is that when alloc_heap_pages
> happens to exhaust a zone list and does a list_del on the last element
> and returns, and then the next call to the same function looks through
> the same list and decides that it is not empty and tries to do a
> list_del, which triggers the BUG I am seeing.
Deleting the last item from a list using list_del() leaves the list in a
well-defined state. list_empty() will return TRUE for the list.
> This patch is based on a suggestion by Jimi Xenidis, and it does indeed
> fix the problem on my blade. I have walked through the code and have
> mostly convinced myself that there are no negative side effects of
> calling list_del_init, but I would appreciate any comments.
list_del_init() initialises the node that is deleted from the list, not the
list itself. Initialising the node to be a new empty list should not be
necessary -- callers to alloc_heap_pages() should not rely on the list-node
pointers being in any way valid.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|