From 45f3d590846a45836e287dbb208a2fed61db431a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 12 Jun 2019 21:13:18 -0400 Subject: lib: Prevent infinite loop in fd handling If we have a case where have created a fd for i/o and we have removed the handling thread but still have the fd in the poll data structure, there existed a case where we would get the handle this fd return from poll but we would immediately do nothing with it because we didn't have a thread to hand the event to. This leads to an infinite loop. Prevent the infinite loop from happening and log the problem. We still need to find the cause of this happening. But let's prevent the system from melting down in the mean time. Fixes: #2796 Signed-off-by: David Lamparter Signed-off-by: Donald Sharp --- lib/lib_errors.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/lib_errors.h') diff --git a/lib/lib_errors.h b/lib/lib_errors.h index 39b39fb065..996a16ba95 100644 --- a/lib/lib_errors.h +++ b/lib/lib_errors.h @@ -45,6 +45,7 @@ enum lib_log_refs { EC_LIB_STREAM, EC_LIB_LINUX_NS, EC_LIB_SLOW_THREAD, + EC_LIB_NO_THREAD, EC_LIB_RMAP_RECURSION_LIMIT, EC_LIB_BACKUP_CONFIG, EC_LIB_VRF_LENGTH, -- cgit v1.2.3