diff options
author | James Westby <jw+debian@jameswestby.net> | 2009-02-11 20:18:24 -0500 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2009-02-11 20:18:24 -0500 |
commit | 2ca61880db1da2b15fe83d0fe94b95245ace77b0 (patch) | |
tree | a96304c8bdcd8f004afe57067e22f43dbf7f03f5 /src/ck-log-event.h | |
parent | 1ddd056da19a9e99b10601a557ebbcaf101d0de9 (diff) |
serialize removals, and avoid using freed data caused by removals
I changed the code to also loop through watch->notifies when
removing the watch due to inotify, and NULL each notify->watch
reference, the code then checks this before trying to delete
the watch itself if asked to remove the notify.
In order to prevent other race conditions in this area I also
made the inotify code not pass a watch to emit_events_in_idle,
as the watch may get freed in the meantime. It instead passes
the wd and the emit loop looks up the watch, discarding the
event if the watch has been removed.
I did however leave in the code that checks for a removed watch
before doing anything with inotify, as I hoped that this would
just optimise this case.
Diffstat (limited to 'src/ck-log-event.h')
0 files changed, 0 insertions, 0 deletions