Skip to content

Commit

Permalink
FIXME: possible crash due to resched triggered by put_files_struct()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
shenping-bd committed Dec 4, 2023
1 parent 3f5dd26 commit a4da965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/LKM/src/smith_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a4da965

Please sign in to comment.