android_kernel_xiaomi_sm8350/include
Rafael J. Wysocki 33e1c288da freezer: close potential race between refrigerator and thaw_tasks
If the freezing of tasks fails and a task is preempted in refrigerator()
before calling frozen_process(), then thaw_tasks() may run before this task is
frozen.  In that case the task will freeze and no one will thaw it.

To fix this race we can call freezing(current) in refrigerator() along with
frozen_process(current) under the task_lock() which also should be taken in
the error path of try_to_freeze_tasks() as well as in thaw_process().
Moreover, if thaw_process() additionally clears TIF_FREEZE for tasks that are
not frozen, we can be sure that all tasks are thawed and there are no pending
"freeze" requests after thaw_tasks() has run.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:10 -07:00
..
acpi acpi: fix potential call to a freed memory section. 2007-05-17 05:23:04 -07:00
asm-alpha alpha: fix hard_smp_processor_id compile error 2007-05-15 08:54:00 -07:00
asm-arm Merge master.kernel.org:/home/rmk/linux-2.6-arm 2007-05-21 10:00:22 -07:00
asm-arm26 Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
asm-avr32 [AVR32] Implement platform hooks for atmel_lcdfb driver 2007-05-15 14:13:27 +02:00
asm-blackfin Blackfin arch: Change NO_ACCESS_CHECK to ACCESS_CHECK 2007-05-21 09:50:23 -07:00
asm-cris Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
asm-frv Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
asm-generic kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings 2007-05-19 09:11:58 +02:00
asm-h8300 h8300 atomic.h update 2007-05-15 08:54:00 -07:00
asm-i386 Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
asm-ia64 [IA64] Fix bogus messages about system calls not implemented. 2007-05-18 14:15:58 -07:00
asm-m32r m32r: __xchg() should be always_inline 2007-05-15 18:56:37 -07:00
asm-m68k m68k: implement __clear_user() 2007-05-15 08:54:00 -07:00
asm-m68knommu
asm-mips Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
asm-parisc Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
asm-powerpc Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
asm-ppc Merge branch 'linux-2.6' 2007-05-10 21:08:37 +10:00
asm-s390 [S390] Wire up signald, timerfd and eventfd syscalls. 2007-05-21 11:25:28 +02:00
asm-sh sh: Fix dreamcast build for IRQ changes. 2007-05-21 15:10:04 +09:00
asm-sh64 sh64: generic quicklist support. 2007-05-14 09:55:35 +09:00
asm-sparc [SPARC32]: asm/system.h needs asm/smp.h 2007-05-14 03:53:47 -07:00
asm-sparc64 [SPARC64]: Add hypervisor API negotiation and fix console bugs. 2007-05-15 20:23:02 -07:00
asm-um uml: iRQ stacks 2007-05-11 08:29:34 -07:00
asm-v850 Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
asm-x86_64 Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
asm-xtensa Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
crypto
keys
linux freezer: close potential race between refrigerator and thaw_tasks 2007-05-23 20:14:10 -07:00
math-emu
media
mtd
net [NETFILTER]: nf_conntrack: Removes unused destroy operation of l3proto 2007-05-10 23:47:46 -07:00
pcmcia
rdma Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2007-05-21 16:19:32 -07:00
rxrpc
scsi
sound [ALSA] version 1.0.14rc4 2007-05-16 11:45:47 +02:00
video atmel_lcdfb: AT91/AT32 LCD Controller framebuffer driver 2007-05-11 08:29:37 -07:00
Kbuild