lkml.org 
[lkml]   [1999]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] shaper fix for timer SMP races

    On Wed, 17 Feb 1999, Andrea Arcangeli wrote:

    > >> + start_bh_atomic();
    > >> del_timer(&shaper->timer);
    > >> + end_bh_atomic();

    > shaper->timer running on the other CPU while you are deleting it. Yes, the
    > timerlist is preserved from corruption, but you may remove the vmalloced
    > module code while the shaper->timer is running.

    then it's enough to do this:

    + del_timer(&shaper->timer);
    + synchronize_bh(); /* wait for module code to be unused */

    your fix is confusing otherwise.

    -- mingo




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

    \
     
     \ /
      Last update: 2005-03-22 13:50    [W:4.851 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site