]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kernel: freezer: restore TIF_FREEZE
authorSasha Levin <sasha.levin@oracle.com>
Thu, 15 Jan 2015 01:41:19 +0000 (20:41 -0500)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 29 Jun 2015 15:36:55 +0000 (08:36 -0700)
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>
arch/x86/include/asm/thread_info.h
kernel/freezer.c

index b4bdec3e9523e03b7ece3154302c8d95ce2a9ac8..f1eae959ca604198afd4b348e20068811b1bf94f 100644 (file)
@@ -106,6 +106,7 @@ struct thread_info {
 #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 */
index a8900a3bc27a895b65580a23a144e581bfe0149d..143385b5e6543a746dde2ca57710d7e23b3069cd 100644 (file)
@@ -45,6 +45,9 @@ bool freezing_slow_path(struct task_struct *p)
        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;