[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] mce: Fix race condition in mctelem_xchg_head
>>> On 16.01.14 at 16:11, Frediano Ziglio <frediano.ziglio@xxxxxxxxxx> wrote: > This function is used to safely add a element to a list. You pass: > - pointer to pointer to head (headp); > - pointer to pointer to next/prev pointer (old/oldp); > - pointer to list element (new). > Now you own (nobody should allow to touch) the element till it get > inserted to the list. > Now assume we set the pointer after the loop. The head points to an > element which has no next/prev set so you break the list. Another thread > will see a corrupted or shortened list. Ah, okay. So "old" (or "oldp" after you patch) is really misguiding. This should rather become "linkp" or some such then. And in that case I'd then also ask for the declaration of the new "old" to be moved inside the for() body. With that and with at least the spelling mistakes fixed in the description, I'll be fine with the patch. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |