mirror of https://github.com/fail2ban/fail2ban
fixes multi-threaded issue on `__pending` dict (caused due to missing lock on `__pending` dict);
an entry can be deleted by `_delPending` with 1st thread, while 2nd thread in filter doing `_checkPending` where it still got this key in iterator, but later fails in the cycle because `__pending[path]` may be deleted by 1st thread in-between; closes #3635pull/3402/merge
parent
4d603f9726
commit
5d9817728d
|
@ -173,7 +173,9 @@ class FilterPyinotify(FileFilter):
|
|||
if not chkpath(path): # not found - prolong for next time
|
||||
if retardTM < 60: retardTM *= 2
|
||||
if minTime > retardTM: minTime = retardTM
|
||||
self.__pending[path][0] = retardTM
|
||||
try:
|
||||
self.__pending[path][0] = retardTM
|
||||
except KeyError: pass
|
||||
continue
|
||||
logSys.log(logging.MSG, "Log presence detected for %s %s",
|
||||
"directory" if isDir else "file", path)
|
||||
|
|
Loading…
Reference in New Issue