24 Nov, 2011

2 commits

  • There's no in-kernel user of set_freezable_with_signal() left. Mixing
    TIF_SIGPENDING with kernel threads can lead to nasty corner cases as
    kernel threads never travel signal delivery path on their own.

    e.g. the current implementation is buggy in the cancelation path of
    __thaw_task(). It calls recalc_sigpending_and_wake() in an attempt to
    clear TIF_SIGPENDING but the function never clears it regardless of
    sigpending state. This means that signallable freezable kthreads may
    continue executing with !freezing() && stuck TIF_SIGPENDING, which can
    be troublesome.

    This patch removes set_freezable_with_signal() along with
    PF_FREEZER_NOSIG and recalc_sigpending*() calls in freezer. User
    tasks get TIF_SIGPENDING, kernel tasks get woken up and the spurious
    sigpending is dealt with in the usual signal delivery path.

    Signed-off-by: Tejun Heo
    Acked-by: Oleg Nesterov

    Tejun Heo
     
  • Commit 981ed70d8e (dmatest: make dmatest threads freezable) made
    dmatest kthread use set_freezable_with_signal(); however, the
    interface is scheduled to be removed in the next merge window.

    The problem is that unlike userland tasks there's no default place
    which handles signal pending state and it isn't clear who owns and/or
    is responsible for clearing TIF_SIGPENDING. For example, in the
    current code, try_to_freeze() clears TIF_SIGPENDING but it isn't sure
    whether it actually owns the TIF_SIGPENDING nor is it race-free -
    ie. the task may continue to run with TIF_SIGPENDING set after the
    freezable section.

    Unfortunately, we don't have wait_for_completion_freezable_timeout().
    This patch open codes it and uses wait_event_freezable_timeout()
    instead and removes timeout reloading - wait_event_freezable_timeout()
    won't return across freezing events (currently racy but fix scheduled)
    and timer doesn't decrement while the task is in freezer. Although
    this does lose timer-reset-over-freezing, given that timeout is
    supposed to be long enough and failure to finish inside is considered
    irrecoverable, I don't think this is worth the complexity.

    While at it, move completion to outer scope and explain that we're
    ignoring dangling pointer problem after timeout. This should give
    slightly better chance at avoiding oops after timeout.

    Signed-off-by: Tejun Heo
    Acked-by: Dan Williams
    Cc: Guennadi Liakhovetski
    Cc: Nicolas Ferre

    Tejun Heo
     

22 Nov, 2011

21 commits

  • The current implementation of set_freezable_with_signal() is buggy and
    tricky to get right. usb-storage is the only user and its use can be
    avoided trivially.

    All usb-storage wants is to be able to sleep with timeout and get
    woken up if freezing() becomes true. This can be trivially
    implemented by doing interruptible wait w/ freezing() included in the
    wait condition. There's no reason to use set_freezable_with_signal().

    Perform interruptible wait on freezing() instead of using
    set_freezable_with_signal(), which is scheduled for removal.

    Signed-off-by: Tejun Heo
    Cc: Oleg Nesterov
    Cc: "Rafael J. Wysocki"
    Cc: Seth Forshee
    Cc: Alan Stern
    Cc: Greg Kroah-Hartman

    Tejun Heo
     
  • After "freezer: make freezing() test freeze conditions in effect
    instead of TIF_FREEZE", freezing() returns authoritative answer on
    whether the current task should freeze or not and freeze_task()
    doesn't need or use @sig_only. Remove it.

    While at it, rewrite function comment for freeze_task() and rename
    @sig_only to @user_only in try_to_freeze_tasks().

    This patch doesn't cause any functional change.

    Signed-off-by: Tejun Heo
    Acked-by: Oleg Nesterov

    Tejun Heo
     
  • cgroup_freezer calls freeze_task() without holding tasklist_lock and,
    if the task is exiting, its ->sighand may be gone by the time
    fake_signal_wake_up() is called. Use lock_task_sighand() instead of
    accessing ->sighand directly.

    Signed-off-by: Tejun Heo
    Reported-by: Oleg Nesterov
    Acked-by: Oleg Nesterov
    Cc: "Rafael J. Wysocki"
    Cc: Paul Menage

    Tejun Heo
     
  • If another freeze happens before all tasks leave FROZEN state after
    being thawed, the freezer can see the existing FROZEN and consider the
    tasks to be frozen but they can clear FROZEN without checking the new
    freezing().

    Oleg suggested restructuring __refrigerator() such that there's single
    condition check section inside freezer_lock and sigpending is cleared
    afterwards, which fixes the problem and simplifies the code.
    Restructure accordingly.

    -v2: Frozen loop exited without releasing freezer_lock. Fixed.

    Signed-off-by: Tejun Heo
    Reported-by: Oleg Nesterov
    Acked-by: Oleg Nesterov
    Cc: "Rafael J. Wysocki"

    Tejun Heo
     
  • A kthread doing set_freezable*() may race with on-going PM freeze and
    the freezer might think all tasks are frozen while the new freezable
    kthread is merrily proceeding to execute code paths which aren't
    supposed to be executing during PM freeze.

    Reimplement set_freezable[_with_signal]() using __set_freezable() such
    that freezable PF flags are modified under freezer_lock and
    try_to_freeze() is called afterwards. This eliminates race condition
    against freezing.

    Note: Separated out from larger patch to resolve fix order dependency
    Oleg pointed out.

    Signed-off-by: Tejun Heo
    Cc: Oleg Nesterov

    Tejun Heo
     
  • should_send_signal() is only used in freezer.c. Exporting them only
    increases chance of abuse. Open code the two users and remove it.

    Update frozen() to return bool.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Signed-off-by: Tejun Heo
    Cc: Arnd Bergmann
    Cc: linux-arch@vger.kernel.org

    Tejun Heo
     
  • Using TIF_FREEZE for freezing worked when there was only single
    freezing condition (the PM one); however, now there is also the
    cgroup_freezer and single bit flag is getting clumsy.
    thaw_processes() is already testing whether cgroup freezing in in
    effect to avoid thawing tasks which were frozen by both PM and cgroup
    freezers.

    This is racy (nothing prevents race against cgroup freezing) and
    fragile. A much simpler way is to test actual freeze conditions from
    freezing() - ie. directly test whether PM or cgroup freezing is in
    effect.

    This patch adds variables to indicate whether and what type of
    freezing conditions are in effect and reimplements freezing() such
    that it directly tests whether any of the two freezing conditions is
    active and the task should freeze. On fast path, freezing() is still
    very cheap - it only tests system_freezing_cnt.

    This makes the clumsy dancing aroung TIF_FREEZE unnecessary and
    freeze/thaw operations more usual - updating state variables for the
    new state and nudging target tasks so that they notice the new state
    and comply. As long as the nudging happens after state update, it's
    race-free.

    * This allows use of freezing() in freeze_task(). Replace the open
    coded tests with freezing().

    * p != current test is added to warning printing conditions in
    try_to_freeze_tasks() failure path. This is necessary as freezing()
    is now true for the task which initiated freezing too.

    -v2: Oleg pointed out that re-freezing FROZEN cgroup could increment
    system_freezing_cnt. Fixed.

    Signed-off-by: Tejun Heo
    Acked-by: Paul Menage (for the cgroup portions)

    Tejun Heo
     
  • TIF_FREEZE will be removed soon and freezing() will directly test
    whether any freezing condition is in effect. Make the following
    changes in preparation.

    * Rename cgroup_freezing_or_frozen() to cgroup_freezing() and make it
    return bool.

    * Make cgroup_freezing() access task_freezer() under rcu read lock
    instead of task_lock(). This makes the state dereferencing racy
    against task moving to another cgroup; however, it was already racy
    without this change as ->state dereference wasn't synchronized.
    This will be later dealt with using attach hooks.

    * freezer->state is now set before trying to push tasks into the
    target state.

    -v2: Oleg pointed out that freeze_change_state() was setting
    freeze->state incorrectly to CGROUP_FROZEN instead of
    CGROUP_FREEZING. Fixed.

    -v3: Matt pointed out that setting CGROUP_FROZEN used to always invoke
    try_to_freeze_cgroup() regardless of the current state. Patch
    updated such that the actual freeze/thaw operations are always
    performed on invocation. This shouldn't make any difference
    unless something is broken.

    Signed-off-by: Tejun Heo
    Acked-by: Paul Menage
    Cc: Li Zefan
    Cc: Oleg Nesterov

    Tejun Heo
     
  • freeze_processes() failure path is rather messy. Freezing is canceled
    for workqueues and tasks which aren't frozen yet but frozen tasks are
    left alone and should be thawed by the caller and of course some
    callers (xen and kexec) didn't do it.

    This patch updates __thaw_task() to handle cancelation correctly and
    makes freeze_processes() and freeze_kernel_threads() call
    thaw_processes() on failure instead so that the system is fully thawed
    on failure. Unnecessary [suspend_]thaw_processes() calls are removed
    from kernel/power/hibernate.c, suspend.c and user.c.

    While at it, restructure error checking if clause in suspend_prepare()
    to be less weird.

    -v2: Srivatsa spotted missing removal of suspend_thaw_processes() in
    suspend_prepare() and error in commit message. Updated.

    Signed-off-by: Tejun Heo
    Acked-by: Srivatsa S. Bhat

    Tejun Heo
     
  • With the previous changes, there's no meaningful difference between
    PF_FREEZING and PF_FROZEN. Remove PF_FREEZING and use PF_FROZEN
    instead in task_contributes_to_load().

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • try_to_freeze_tasks() and thaw_processes() use freezable() and
    frozen() as preliminary tests before initiating operations on a task.
    These are done without any synchronization and hinder with
    synchronization cleanup without any real performance benefits.

    In try_to_freeze_tasks(), open code self test and move PF_NOFREEZE and
    frozen() tests inside freezer_lock in freeze_task().

    thaw_processes() can simply drop freezable() test as frozen() test in
    __thaw_task() is enough.

    Note: This used to be a part of larger patch to fix set_freezable()
    race. Separated out to satisfy ordering among dependent fixes.

    Signed-off-by: Tejun Heo
    Cc: Oleg Nesterov

    Tejun Heo
     
  • Currently freezing (TIF_FREEZE) and frozen (PF_FROZEN) states are
    interlocked - freezing is set to request freeze and when the task
    actually freezes, it clears freezing and sets frozen.

    This interlocking makes things more complex than necessary - freezing
    doesn't mean there's freezing condition in effect and frozen doesn't
    match the task actually entering and leaving frozen state (it's
    cleared by the thawing task).

    This patch makes freezing indicate that freeze condition is in effect.
    A task enters and stays frozen if freezing. This makes PF_FROZEN
    manipulation done only by the task itself and prevents wakeup from
    __thaw_task() leaking outside of refrigerator.

    The only place which needs to tell freezing && !frozen is
    try_to_freeze_task() to whine about tasks which don't enter frozen.
    It's updated to test the condition explicitly.

    With the change, frozen() state my linger after __thaw_task() until
    the task wakes up and exits fridge. This can trigger BUG_ON() in
    update_if_frozen(). Work it around by testing freezing() && frozen()
    instead of frozen().

    -v2: Oleg pointed out missing re-check of freezing() when trying to
    clear FROZEN and possible spurious BUG_ON() trigger in
    update_if_frozen(). Both fixed.

    Signed-off-by: Tejun Heo
    Cc: Oleg Nesterov
    Cc: Paul Menage

    Tejun Heo
     
  • Freezer synchronization is needlessly complicated - it's by no means a
    hot path and the priority is staying unintrusive and safe. This patch
    makes it simply use a dedicated lock instead of piggy-backing on
    task_lock() and playing with memory barriers.

    On the failure path of try_to_freeze_tasks(), locking is moved from it
    to cancel_freezing(). This makes the frozen() test racy but the race
    here is a non-issue as the warning is printed for tasks which failed
    to enter frozen for 20 seconds and race on PF_FROZEN at the last
    moment doesn't change anything.

    This simplifies freezer implementation and eases further changes
    including some race fixes.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • There's no point in thawing nosig tasks before others. There's no
    ordering requirement between the two groups on thaw, which the staged
    thawing can't guarantee anyway. Simplify thaw_processes() by removing
    the distinction and collapsing thaw_tasks() into thaw_processes().
    This will help further updates to freezer.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • clear_freeze_flag() in exit_mm() is racy. Freezing can start
    afterwards. Remove it. Skipping freezer for exiting task will be
    properly implemented later.

    Also, freezable() was testing exit_state directly to make system
    freezer ignore dead tasks. Let the exiting task set PF_NOFREEZE after
    entering TASK_DEAD instead.

    Signed-off-by: Tejun Heo
    Cc: Oleg Nesterov

    Tejun Heo
     
  • thaw_process() now has only internal users - system and cgroup
    freezers. Remove the unnecessary return value, rename, unexport and
    collapse __thaw_process() into it. This will help further updates to
    the freezer code.

    -v3: oom_kill grew a use of thaw_process() while this patch was
    pending. Convert it to use __thaw_task() for now. In the longer
    term, this should be handled by allowing tasks to die if killed
    even if it's frozen.

    -v2: minor style update as suggested by Matt.

    Signed-off-by: Tejun Heo
    Cc: Paul Menage
    Cc: Matt Helsley

    Tejun Heo
     
  • Writeback and thinkpad_acpi have been using thaw_process() to prevent
    deadlock between the freezer and kthread_stop(); unfortunately, this
    is inherently racy - nothing prevents freezing from happening between
    thaw_process() and kthread_stop().

    This patch implements kthread_freezable_should_stop() which enters
    refrigerator if necessary but is guaranteed to return if
    kthread_stop() is invoked. Both thaw_process() users are converted to
    use the new function.

    Note that this deadlock condition exists for many of freezable
    kthreads. They need to be converted to use the new should_stop or
    freezable workqueue.

    Tested with synthetic test case.

    Signed-off-by: Tejun Heo
    Acked-by: Henrique de Moraes Holschuh
    Cc: Jens Axboe
    Cc: Oleg Nesterov

    Tejun Heo
     
  • There is no reason to export two functions for entering the
    refrigerator. Calling refrigerator() instead of try_to_freeze()
    doesn't save anything noticeable or removes any race condition.

    * Rename refrigerator() to __refrigerator() and make it return bool
    indicating whether it scheduled out for freezing.

    * Update try_to_freeze() to return bool and relay the return value of
    __refrigerator() if freezing().

    * Convert all refrigerator() users to try_to_freeze().

    * Update documentation accordingly.

    * While at it, add might_sleep() to try_to_freeze().

    Signed-off-by: Tejun Heo
    Cc: Samuel Ortiz
    Cc: Chris Mason
    Cc: "Theodore Ts'o"
    Cc: Steven Whitehouse
    Cc: Andrew Morton
    Cc: Jan Kara
    Cc: KONISHI Ryusuke
    Cc: Christoph Hellwig

    Tejun Heo
     
  • Some drivers set PF_NOFREEZE in their kthread functions which is
    completely unnecessary and racy - some part of freezer code doesn't
    consider cases where PF_NOFREEZE is set asynchronous to freezer
    operations.

    In general, there's no reason to allow setting PF_NOFREEZE explicitly.
    Remove them and change the documentation to note that setting
    PF_NOFREEZE directly isn't allowed.

    -v2: Dropped change to twl4030-irq.c as it no longer uses PF_NOFREEZE.

    Signed-off-by: Tejun Heo
    Acked-by: "Gustavo F. Padovan"
    Acked-by: Samuel Ortiz
    Cc: Marcel Holtmann
    Cc: wwang

    Tejun Heo
     
  • refrigerator() saves current->state before entering frozen state and
    restores it before returning using __set_current_state(); however,
    this is racy, for example, please consider the following sequence.

    set_current_state(TASK_INTERRUPTIBLE);
    try_to_freeze();
    if (kthread_should_stop())
    break;
    schedule();

    If kthread_stop() races with ->state restoration, the restoration can
    restore ->state to TASK_INTERRUPTIBLE after kthread_stop() sets it to
    TASK_RUNNING but kthread_should_stop() may still see zero
    ->should_stop because there's no memory barrier between restoring
    TASK_INTERRUPTIBLE and kthread_should_stop() test.

    This isn't restricted to kthread_should_stop(). current->state is
    often used in memory barrier based synchronization and silently
    restoring it w/o mb breaks them.

    Use set_current_state() instead.

    Signed-off-by: Tejun Heo

    Tejun Heo
     

21 Nov, 2011

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits)
    ipv4: fix redirect handling
    ping: dont increment ICMP_MIB_INERRORS
    sky2: fix hang in napi_disable
    sky2: enforce minimum ring size
    bonding: Don't allow mode change via sysfs with slaves present
    f_phonet: fix page offset of first received fragment
    stmmac: fix pm functions avoiding sleep on spinlock
    stmmac: remove spin_lock in stmmac_ioctl.
    stmmac: parameters auto-tuning through HW cap reg
    stmmac: fix advertising 1000Base capabilties for non GMII iface
    stmmac: use mdelay on timeout of sw reset
    sky2: version 1.30
    sky2: used fixed RSS key
    sky2: reduce default Tx ring size
    sky2: rename up/down functions
    sky2: pci posting issues
    sky2: fix hang on shutdown (and other irq issues)
    r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list
    MAINTAINERS: change email address for shemminger
    pch_gbe: Move #include of module.h
    ...

    Linus Torvalds
     
  • * 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM guest: prevent tracing recursion with kvmclock
    Revert "KVM: PPC: Add support for explicit HIOR setting"
    KVM: VMX: Check for automatic switch msr table overflow
    KVM: VMX: Add support for guest/host-only profiling
    KVM: VMX: add support for switching of PERF_GLOBAL_CTRL
    KVM: s390: announce SYNC_MMU
    KVM: s390: Fix tprot locking
    KVM: s390: handle SIGP sense running intercepts
    KVM: s390: Fix RUNNING flag misinterpretation

    Linus Torvalds
     
  • * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
    ARM: wire up process_vm_writev and process_vm_readv syscalls
    ARM: 7160/1: setup: avoid overflowing {elf,arch}_name from proc_info_list
    ARM: 7158/1: add new MFP implement for NUC900
    ARM: 7157/1: fix a building WARNING for nuc900
    ARM: 7156/1: l2x0: fix compile error on !CONFIG_USE_OF
    ARM: 7155/1: arch.h: Declare 'pt_regs' locally
    ARM: 7154/1: mach-bcmring: fix build error in dma.c
    ARM: 7153/1: mach-bcmring: fix build error in core.c
    ARM: 7152/1: distclean: Remove generated .dtb files
    ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors
    ARM: 7149/1: spi/pl022: Enable clock in probe
    Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage"

    Linus Torvalds
     
  • * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PM / Suspend: Fix bug in suspend statistics update
    PM / Hibernate: Fix the early termination of test modes
    PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
    PM Sleep: Do not extend wakeup paths to devices with ignore_children set
    PM / driver core: disable device's runtime PM during shutdown
    PM / devfreq: correct Kconfig dependency
    PM / devfreq: fix use after free in devfreq_remove_device
    PM / shmobile: Avoid restoring the INTCS state during initialization
    PM / devfreq: Remove compiler error after irq.h update
    PM / QoS: Properly use the WARN() macro in dev_pm_qos_add_request()
    PM / Clocks: Only disable enabled clocks in pm_clk_suspend()
    ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix
    PM / shmobile: Don't skip debugging output in pd_power_up()

    Linus Torvalds
     

20 Nov, 2011

2 commits


19 Nov, 2011

11 commits

  • After commit 2a77c46de1e3dace73745015635ebbc648eca69c
    (PM / Suspend: Add statistics debugfs file for suspend to RAM)
    a missing pair of braces inside the state_store() function causes even
    invalid arguments to suspend to be wrongly treated as failed suspend
    attempts. Fix this.

    [rjw: Put the hash/subject of the buggy commit into the changelog.]

    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     
  • No longer at Citrix, still interested in Xen.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • Dummy, non-zero definitions for HPAGE_MASK and HPAGE_SIZE were added in
    51c6f666fceb ("mm: ZAP_BLOCK causes redundant work") to avoid a divide
    by zero in generic kernel code.

    That code has since been removed, but probably should never have been
    added in the first place: we don't want HPAGE_SIZE to act like PAGE_SIZE
    for code that is working with hugepages, for example, when the
    dependency on CONFIG_HUGETLB_PAGE has not been fulfilled.

    Because hugepage size can differ from architecture to architecture, each
    is required to have their own definitions for both HPAGE_MASK and
    HPAGE_SIZE. This is always done in arch/*/include/asm/page.h.

    So, just remove the dummy and dangerous definitions since they are no
    longer needed and reveals the correct dependencies. Tested on
    architectures using the definitions with allyesconfig: x86 (even with
    thp), hppa, mips, powerpc, s390, sh3, sh4, sparc, and sparc64, and with
    defconfig on ia64.

    Signed-off-by: David Rientjes
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    new helper: mount_subtree()
    switch create_mnt_ns() to saner calling conventions, fix double mntput() in nfs
    btrfs: fix double mntput() in mount_subvol()

    Linus Torvalds
     
  • * 'for-linus' of git://oss.sgi.com/xfs/xfs:
    MAINTAINERS: update XFS maintainer entry
    xfs: use doalloc flag in xfs_qm_dqattach_one()

    Linus Torvalds
     
  • * 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    cgroup: Replace Paul Menage with Tejun Heo as cgroups maintainer

    Linus Torvalds
     
  • * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    random: Fix handing of arch_get_random_long in get_random_bytes()
    x86: Call stop_machine_text_poke() on all CPUs
    x86, ioapic: Only print ioapic debug information for IRQs belonging to an ioapic chip
    x86/mrst: Avoid reporting wrong nmi status
    x86/mrst: Add support for Penwell clock calibration
    x86/apic: Allow use of lapic timer early calibration result
    x86/apic: Do not clear nr_irqs_gsi if no legacy irqs
    x86/platform: Add a wallclock_init func to x86_platforms ops
    x86/mce: Make mce_chrdev_ops 'static const'

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
    cy82c693: fix PCI device selection
    icside: DMA support fix
    IDE: Don't powerdown Compaq Triflex IDE device on suspend
    piix: ICH7 MWDMA1 errata

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc64: Patch sun4v code sequences properly on module load.
    sparc: Kill custom io_remap_pfn_range().
    sparc: Stash orig_i0 into %g6 instead of %g2
    sparc: Fix handling of orig_i0 wrt. debugging when restarting syscalls.
    sparc: sigutil: Include

    Linus Torvalds
     
  • As is probably painfully obvious, I don't have time to be a cgroups
    maintainer. Rather than have me continue to hope that I'll magically
    find more spare time, instead Tejun has kindly agreed to take over the
    role, along with Li Zefan.

    -tj: added cgroup tree URL to MAINTAINERS file

    Signed-off-by: Paul Menage
    Acked-by: Li Zefan
    Signed-off-by: Tejun Heo
    LKML-Reference:

    Paul Menage
     
  • Commit 2aede851ddf08666f68ffc17be446420e9d2a056
    (PM / Hibernate: Freeze kernel threads after preallocating memory)
    postponed the freezing of kernel threads to after preallocating memory
    for hibernation. But while doing that, the hibernation test TEST_FREEZER
    and the test mode HIBERNATION_TESTPROC were not moved accordingly.

    As a result, when using these test modes, it only goes upto the freezing of
    userspace and exits, when in fact it should go till the complete end of task
    freezing stage, namely the freezing of kernel threads as well.

    So, move these points of exit to appropriate places so that freezing of
    kernel threads is also tested while using these test harnesses.

    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat