lkml.org 
[lkml]   [2015]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: sched: memory corruption on completing completions
    From
    Date
    On Wed, 2015-02-04 at 16:16 -0800, Linus Torvalds wrote:
    > And looking at the arch version, I think the paravirtualized code is crap.
    >
    > It does:
    >
    > prev = *lock;
    > add_smp(&lock->tickets.head, TICKET_LOCK_INC);
    >
    > /* add_smp() is a full mb() */
    >
    > if (unlikely(lock->tickets.tail & TICKET_SLOWPATH_FLAG))
    > __ticket_unlock_slowpath(lock, prev);
    >
    >
    > which is *exactly* the kind of things you cannot do with spinlocks,
    > because after you've done the "add_smp()" and released the spinlock
    > for the fast-path, you can't access the spinlock any more. Exactly
    > because a fast-path lock migth come in, and release the whole data
    > structure.
    >
    > As usual, the paravirt code is a horribly buggy heap of crud. Film at 11.

    Per http://lwn.net/Articles/495597/ which clearly describes the intent
    of the slowpath unlocking. Cc'ing Raghavendra.

    Thanks,
    Davidlohr



    \
     
     \ /
      Last update: 2015-02-05 22:21    [W:8.731 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site