[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] page_list_splice
>>> Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> 05.03.09 21:23 >>> >Without this clause, I get a null-pointer (actually null+4) >dereference... I think I must be missing some basic >difference between normal list code and page_list code. The basic difference is that page_list_head has NULL pointers when empty, whereas 'normal' lists heads have pointers to itself. So as Keir already stated, yes, the second conditional is needed. >Anyway, could you take a look at the routine to see if >I've missed something obvious in the case where neither >page_list parameter is empty? It's tough to reproduce >this condition and you might be able to see a bug >on inspection. (Or maybe the differences between normal >list code and page_list code require the extra >page_list_empty check and this code will work properly >regardless of whether one or both page_list is empty.) The one question I would have is whether you indeed intend this to be an insertion at the head of the list - inserting at the tail would seem more natural. The 'normal' list accessors allow doing this by simply passing &head->prev as the second argument, but since the page lists aren't symmetric this cannot be done that way by the invoking code (and hence a suffix-less version of page_list_splice() would seem to more naturally splice to the end of the existing list, while if splicing to the beginning is indeed intended I'd favor calling it page_list_splice_head() or some such). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |