Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#187 drm_freelist_put and drm_freelist_try are not SMP safe

closed-fixed
Rik Faith
9
2000-09-13
2000-08-17
Rik Faith
No

David Mosberger <davidm@hpl.hp.com> explains that list manipulation isn't possible with cmpxchg because of the "ABA problem". From David's email:

> To see this, consider the case
> where you have a list like this:
>
> head --> A --> B -/
>
> Now, suppose CPU1 wants to remove the element at the head of the list
> (A). It will pick up "head == A", "head->next == B", then another
> processor sneaks in, removes A and B and then reinserts A. At this
> point, the cmpxchg on CPU1 executes and it will see that "head" still
> points to A, so it will execute successfully. Now you end up with:
>
> head --> B
>
> which is obviously bogus.

Discussion

  • Rik Faith
    Rik Faith
    2000-08-17

    • priority: 5 --> 9
    • assigned_to: nobody --> faith
     
  • Rik Faith
    Rik Faith
    2000-09-13

    • status: open --> closed-fixed
     
  • Rik Faith
    Rik Faith
    2000-09-13

    Fixed. Patches accepted by Linus into kernel.