From a4da96556a0de10c91ea9cc76e18fe50744acda8 Mon Sep 17 00:00:00 2001 From: "shenping.matt" Date: Mon, 4 Dec 2023 18:23:16 +0800 Subject: [PATCH] FIXME: possible crash due to resched triggered by put_files_struct() When parent process is exiting, the last put_files_struct() would try to drop all files which triggers a resched(). In get_process_socket() it will access the files tables of the process which is being exit, and thus trigger the resched() in atomic context. Signed-off-by: shenping.matt --- driver/LKM/src/smith_hook.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/LKM/src/smith_hook.c b/driver/LKM/src/smith_hook.c index f4e9e8438..c5cd34738 100644 --- a/driver/LKM/src/smith_hook.c +++ b/driver/LKM/src/smith_hook.c @@ -60,7 +60,7 @@ int FAKE_RM = 0; int PID_TREE_LIMIT = 12; int PID_TREE_LIMIT_LOW = 8; -int EXECVE_GET_SOCK_PID_LIMIT = 4; +int EXECVE_GET_SOCK_PID_LIMIT = 1; /* put_files_struct() could reschedule */ int EXECVE_GET_SOCK_FD_LIMIT = 12; /* maximum fd numbers to be queried */ char connect_syscall_kprobe_state = 0x0;