kernel: Fix kernel panics caused by thread info flag corruption

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
This commit is contained in:
Sultan Alsawaf
2025-10-18 19:37:24 -07:00
committed by ShirkNeko
parent 8b90ab778f
commit d9be01661a

View File

@@ -227,9 +227,9 @@ static void disable_seccomp(struct task_struct *tsk)
// disable seccomp
#if defined(CONFIG_GENERIC_ENTRY) && \
LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
current_thread_info()->syscall_work &= ~SYSCALL_WORK_SECCOMP;
clear_syscall_work(SECCOMP);
#else
current_thread_info()->flags &= ~(TIF_SECCOMP | _TIF_SECCOMP);
clear_thread_flag(TIF_SECCOMP);
#endif
#ifdef CONFIG_SECCOMP