lkml.org 
[lkml]   [2007]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] fix theoretical ccids_{read,write}_lock() race
    Make sure that spin_unlock_wait() is properly ordered wrt atomic_inc().

    Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

    --- t/net/dccp/ccid.c~ccid 2006-12-18 18:17:31.000000000 +0300
    +++ t/net/dccp/ccid.c 2007-07-21 18:29:21.000000000 +0400
    @@ -40,6 +40,7 @@ static inline void ccids_write_unlock(vo
    static inline void ccids_read_lock(void)
    {
    atomic_inc(&ccids_lockct);
    + smp_mb__after_atomic_inc();
    spin_unlock_wait(&ccids_lock);
    }

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-07-21 17:03    [W:0.018 / U:0.432 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site