lkml.org 
[lkml]   [2009]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 04/13] fsnotify: add in inode fsnotify markings
    On Mon, Mar 23, 2009 at 09:28:30AM +0000, Al Viro wrote:
    > Note that for inotify ->freeing_mark() will happily add notification to
    > group's queue and that's another race of the same nature - even if
    > group itself isn't yet freed, that final put_group() might bloody well
    > get past flushing the queue.
    >
    > I really don't like the idea of having marks contributing to group refcount -
    > that would have solved this one, but we'd get potential leaks from hell ;-/
    > Maybe a separate counter controlling only actual freeing of group?

    Actually, let's make it
    number of entries with this ->group +
    1 if group is not past the eviction of marks in destroy_group
    Then destroy_group would evict marks, decrement that sucker and if it's 0 -
    call rest_of_destroy_group(). And destroy_mark_by_entry() would
    do the same decrement-and-call-if-0. With everything starting at queue
    flush done in rest_of_destroy_group().

    AFAICS, that would work without creating leaks. Comments?


    \
     
     \ /
      Last update: 2009-03-23 10:57    [W:0.021 / U:29.684 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site