[lkml]   [2005]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] fix race in mark_mounts_for_expiry()
    > > How about this patch?  It tries to solve this race without additional
    > > locking. If refcount is already zero, it will increment and decrement
    > > it. So be careful to only call grab_namespace() with vfsmount_lock
    > > held, otherwise it could race with itself. (vfsmount_lock is also
    > > needed in this case so that mnt->mnt_namespace, doesn't change, while
    > > grabbing the namespace)
    > How about using cmpxchg?

    How? If the count is nonzero, an incremented count must be stored.
    You can't do that atomically with cmpxchg.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-05-18 12:46    [W:0.020 / U:1.360 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site