Ksplice needs to freeze threads while in kernel. This facility was removed
from upstream since it was no longer required, but Ksplice still needs
it.
Re-add TIF_FREEZE to allow Ksplice to freeze threads.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
#define TIF_IO_BITMAP 22 /* uses I/O bitmap */
#define TIF_FORCED_TF 24 /* true if TF in eflags artificially */
#define TIF_BLOCKSTEP 25 /* set when we want DEBUGCTLMSR_BTF */
+#define TIF_FREEZE 26 /* is freezing for suspend */
#define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */
#define TIF_SYSCALL_TRACEPOINT 28 /* syscall tracepoint instrumentation */
#define TIF_ADDR32 29 /* 32-bit address space on 64 bits */
if (test_thread_flag(TIF_MEMDIE))
return false;
+ if (test_tsk_thread_flag(p, TIF_FREEZE))
+ return true;
+
if (pm_nosig_freezing || cgroup_freezing(p))
return true;