lkml.org 
[lkml]   [2010]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Subject[PATCH] [0/9] SYSCTL: Use RCU to avoid races with string sysctls v2
    Date

    v2 version that addresses all the earlier review comments
    minus patches that were already merged.

    I think this one is ready for merge now. Andrew, could you please
    take it?

    Signed-off-by: Andi Kleen <ak@linux.intel.com>

    ---

    With BKL-less sysctls most of the writable string sysctls are racy. There
    is no locking on the reader side, so a reader could see an inconsistent
    string or worse miss the terminating null and walk of beyond it.

    This patch kit adds a new "rcu string" variant to avoid these
    problems and convers the racy users. One the writer side the strings are
    always copied to new memory and the readers use rcu_read_lock()
    to get a stable view. For readers who access the string over
    sleeps the reader copies the string.

    This is all hidden in a new generic "rcu_string" ADT which can be also
    used for other purposes.

    This finally implements all the letters in RCU, most other users
    leave out the 'C'.

    I left some obscure users in architectures (sparc, mips) alone and audited
    all of the others. The sparc reboot_cmd one has references to asm files
    which I didn't want to touch and the mips variant seemd just too obscure.

    All the others are not racy.

    -Andi


    \
     
     \ /
      Last update: 2010-01-05 03:17    [W:4.216 / U:1.516 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site