20 Jul, 2007

19 commits

  • Move "debug during resume from s2ram" into the variable we already use
    for real-mode flags to simplify code. It also closes nasty trap for
    the user in acpi_sleep_setup; order of parameters actually mattered there,
    acpi_sleep=s3_bios,s3_mode doing something different from
    acpi_sleep=s3_mode,s3_bios.

    Signed-off-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Add a feature allowing the user to make the system beep during a resume from
    suspend to RAM, on x86_64 and i386.

    This is useful for the users with broken resume from RAM, so that they can
    verify if the control reaches the kernel after a wake-up event.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • Introduce the pm_power_off_prepare() callback that can be registered by the
    interested platforms in analogy with pm_idle() and pm_power_off(), used for
    preparing the system to power off (needed by ACPI).

    This allows us to drop acpi_sysclass and device_acpi that are only defined in
    order to register the ACPI power off preparation callback, which is needed by
    pm_power_off() registered in a much different way.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • The SNAPSHOT_S2RAM ioctl code is outdated and it should not duplicate the
    suspend code in kernel/power/main.c. Fix that.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • At present, if a user mode helper is running while
    usermodehelper_pm_callback() is executed, the helper may be frozen and the
    completion in call_usermodehelper_exec() won't be completed until user
    space processes are thawed. As a result, the freezing of kernel threads
    may fail, which is not desirable.

    Prevent this from happening by introducing a counter of running user mode
    helpers and allowing usermodehelper_pm_callback() to succeed for action =
    PM_HIBERNATION_PREPARE or action = PM_SUSPEND_PREPARE only if there are no
    helpers running. [Namely, usermodehelper_pm_callback() waits for at most
    RUNNING_HELPERS_TIMEOUT for the number of running helpers to become zero
    and fails if that doesn't happen.]

    Special thanks to Uli Luckas , Pavel Machek
    and Oleg Nesterov for reviewing the
    previous versions of this patch and for very useful comments.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Uli Luckas
    Acked-by: Nigel Cunningham
    Acked-by: Pavel Machek
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Use a hibernation and suspend notifier to disable the user mode helper before
    a hibernation/suspend and enable it after the operation.

    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Acked-by: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Make it possible to register hibernation and suspend notifiers, so that
    subsystems can perform hibernation-related or suspend-related operations that
    should not be carried out by device drivers' .suspend() and .resume()
    routines.

    [akpm@linux-foundation.org: build fixes]
    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • We don't need to check if todo is positive before calling time_after() in
    try_to_freeze_tasks(), because if todo is zero at this point, the loop will be
    broken anyway due to the while () condition being false.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Make try_to_freeze_tasks() and freeze_processes() return -EBUSY on failure
    instead of the number of unfrozen tasks (none of the callers actually uses
    this number).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Use __set_current_state() as appropriate in refrigerator() instead of
    accessing current->state directly.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Kernel threads should not have TIF_FREEZE set when user space processes are
    being frozen, since otherwise some of them might be frozen prematurely.
    To prevent this from happening we can (1) make exit_mm() unset TIF_FREEZE
    unconditionally just after clearing tsk->mm and (2) make try_to_freeze_tasks()
    check if p->mm is different from zero and PF_BORROWED_MM is unset in p->flags
    when user space processes are to be frozen.

    Namely, when user space processes are being frozen, we only should set
    TIF_FREEZE for tasks that have p->mm different from NULL and don't have
    PF_BORROWED_MM set in p->flags. For this reason task_lock() must be used to
    prevent try_to_freeze_tasks() from racing with use_mm()/unuse_mm(), in which
    p->mm and p->flags.PF_BORROWED_MM are changed under task_lock(p). Also, we
    need to prevent the following scenario from happening:

    * daemonize() is called by a task spawned from a user space code path
    * freezer checks if the task has p->mm set and the result is positive
    * task enters exit_mm() and clears its TIF_FREEZE
    * freezer sets TIF_FREEZE for the task
    * task calls try_to_freeze() and goes to the refrigerator, which is wrong at
    that point

    This requires us to acquire task_lock(p) before p->flags.PF_BORROWED_MM and
    p->mm are examined and release it after TIF_FREEZE is set for p (or it turns
    out that TIF_FREEZE should not be set).

    Signed-off-by: Rafael J. Wysocki
    Cc: Gautham R Shenoy
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • During hibernation we call hibernation_ops->prepare() before creating the image,
    but then, before saving it, we cancel the power transition by calling
    hibernation_ops->finish(). Thus prior to calling hibernation_ops->enter() we
    should let the platform firmware know that we're going to enter the low power
    state after all.

    Signed-off-by: Rafael J. Wysocki
    Cc: Gautham R Shenoy
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Change the code ordering so that hibernation_ops->prepare() is called after
    device_suspend(). This is needed so that we don't violate the ACPI
    specification, which states that the _PTS and _GTS system-control methods,
    executed from acpi_sleep_prepare(), ought to be called after devices have been
    put in low power states.

    The "Finish" label in hibernation_restore() is moved, because device_suspend()
    resumes devices if the suspending of them fails and the restore code ordering
    should reflect the hibernation code ordering.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • At least on some machines it is necessary to prepare the ACPI firmware for the
    restoration of the system memory state from the hibernation image if the
    "platform" mode of hibernation has been used. Namely, in that cases we need
    to disable the GPEs before replacing the "boot" kernel with the "frozen"
    kernel (cf. http://bugzilla.kernel.org/show_bug.cgi?id=7887). After the
    restore they will be re-enabled by hibernation_ops->finish(), but if the
    restore fails, they have to be re-enabled by the restore code explicitly.

    For this purpose we can introduce two additional hibernation operations,
    called pre_restore() and restore_cleanup() and call them from the restore code
    path. Still, they should be called if the "platform" mode of hibernation has
    been used, so we need to pass the information about the hibernation mode from
    the "frozen" kernel to the "boot" kernel in the image header.

    Apparently, we can't drop the disabling of GPEs before the restore because of
    Bug #7887 .  We also can't do it unconditionally, because the GPEs wouldn't
    have been enabled after a successful restore if the suspend had been done in
    the 'shutdown' or 'reboot' mode.

    In principle we could (and probably should) unconditionally disable the GPEs
    before each snapshot creation *and* before the restore, but then we'd have to
    unconditionally enable them after the snapshot creation as well as after the
    restore (or restore failure)   Still, for this purpose we'd need to modify
    acpi_enter_sleep_state_prep() and acpi_leave_sleep_state() and we'd have to
    introduce some mechanism synchronizing the disablind/enabling of the GPEs with
    the device drivers' .suspend()/.resume() routines and with
    disable_/enable_nonboot_cpus().  However, this would have affected the
    suspend (ie. s2ram) code as well as the hibernation, which I'd like to avoid
    in this patch series.

    Signed-off-by: Rafael J. Wysocki
    Cc: Nigel Cunningham
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Currently, much of the code in kernel/power/disk.c is duplicated in
    kernel/power/user.c , mainly for historical reasons. By eliminating this code
    duplication we can reduce the size of user.c quite substantially and remove
    the maintenance difficulty resulting from it.

    [bunk@stusta.de: kernel/power/disk.c: make code static]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • In the face of the recent change of suspend code ordering (cf.
    http://marc.info/?l=linux-acpi&m=117938245931603&w=2) we should also modify
    the code ordering in swsusp so that hibernation_ops->prepare() is executed
    after device_suspend().

    However, for this purpose it seems reasonable to eliminate the code
    duplication between kernel/power/disk.c and kernel/power/user.c first. By
    eliminating it we can reduce the size of user.c quite substantially and remove
    the maintenance difficulty with making essentially the same changes in two
    different places.

    Moreover, we should also remove the calls to "platform" functions from the
    restore code path, since it doesn't carry out any power transition of the
    system, but we generally need to disable the GPEs before the restore if the
    'platform' hibernation mode has been used. To do this, we can introduce two
    new hibernation_ops to be used in the restore code.

    This patch:

    Make the code hibernation code in kernel/power/user.c be functionally
    equivalent to the corresponding code in kernel/power/disk.c , as it should be.

    The calls to the platform functions removed by this patch are incorrect. They
    should be replaced with some other "platform" invocations that will be
    introduced in one of the subsequent patches.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • In order to enable things like PM_TRACE, you're required to enable
    PM_DEBUG, which sends a large spew of messages on boot, and often times can
    overflow dmesg buffer.

    Create new PM_VERBOSE and shift that to be the option that enables
    drivers/base/power's messages.

    Signed-off-by: Ben Collins
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Collins
     
  • To see which tasks are stuck where.

    Cc: "Rafael J. Wysocki"
    Cc: Oleg Nesterov
    Cc: Alan Stern
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This patch completes Linus's wish that the fault return codes be made into
    bit flags, which I agree makes everything nicer. This requires requires
    all handle_mm_fault callers to be modified (possibly the modifications
    should go further and do things like fault accounting in handle_mm_fault --
    however that would be for another patch).

    [akpm@linux-foundation.org: fix alpha build]
    [akpm@linux-foundation.org: fix s390 build]
    [akpm@linux-foundation.org: fix sparc build]
    [akpm@linux-foundation.org: fix sparc64 build]
    [akpm@linux-foundation.org: fix ia64 build]
    Signed-off-by: Nick Piggin
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Bryan Wu
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Greg Ungerer
    Cc: Matthew Wilcox
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Acked-by: Kyle McMartin
    Acked-by: Haavard Skinnemoen
    Acked-by: Ralf Baechle
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    [ Still apparently needs some ARM and PPC loving - Linus ]
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

19 Jul, 2007

1 commit


18 Jul, 2007

14 commits

  • Rather than using a tri-state integer for the wait flag in
    call_usermodehelper_exec, define a proper enum, and use that. I've
    preserved the integer values so that any callers I've missed should
    still work OK.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: James Bottomley
    Cc: Randy Dunlap
    Cc: Christoph Hellwig
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Johannes Berg
    Cc: Ralf Baechle
    Cc: Bjorn Helgaas
    Cc: Joel Becker
    Cc: Tony Luck
    Cc: Kay Sievers
    Cc: Srivatsa Vaddagiri
    Cc: Oleg Nesterov
    Cc: David Howells

    Jeremy Fitzhardinge
     
  • Various pieces of code around the kernel want to be able to trigger an
    orderly poweroff. This pulls them together into a single
    implementation.

    By default the poweroff command is /sbin/poweroff, but it can be set
    via sysctl: kernel/poweroff_cmd. This is split at whitespace, so it
    can include command-line arguments.

    This patch replaces four other instances of invoking either "poweroff"
    or "shutdown -h now": two sbus drivers, and acpi thermal
    management.

    sparc64 has its own "powerd"; still need to determine whether it should
    be replaced by orderly_poweroff().

    Signed-off-by: Jeremy Fitzhardinge
    Acked-by: Len Brown
    Signed-off-by: Chris Wright
    Cc: Andrew Morton
    Cc: Randy Dunlap
    Cc: Andi Kleen
    Cc: Al Viro
    Cc: Arnd Bergmann
    Cc: David S. Miller

    Jeremy Fitzhardinge
     
  • Rather than having hundreds of variations of call_usermodehelper for
    various pieces of usermode state which could be set up, split the
    info allocation and initialization from the actual process execution.

    This means the general pattern becomes:
    info = call_usermodehelper_setup(path, argv, envp); /* basic state */
    call_usermodehelper_(info, stuff...); /* extra state */
    call_usermodehelper_exec(info, wait); /* run process and free info */

    This patch introduces wrappers for all the existing calling styles for
    call_usermodehelper_*, but folds their implementations into one.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Andi Kleen
    Cc: Rusty Russell
    Cc: David Howells
    Cc: Bj?rn Steinbrink
    Cc: Randy Dunlap

    Jeremy Fitzhardinge
     
  • Kill this warning...

    kernel/auditfilter.c: In function ‘audit_receive_filter’:
    kernel/auditfilter.c:1213: warning: ‘ndw’ may be used uninitialized in this function
    kernel/auditfilter.c:1213: warning: ‘ndp’ may be used uninitialized in this function

    ...with a simplification of the code. audit_put_nd() can accept NULL
    arguments, just like kfree(). It is cleaner to init two existing vars
    to NULL, remove the redundant test variable 'putnd_needed' branches, and call
    audit_put_nd() directly.

    As a desired side effect, the warning goes away.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (80 commits)
    KVM: Use CPU_DYING for disabling virtualization
    KVM: Tune hotplug/suspend IPIs
    KVM: Keep track of which cpus have virtualization enabled
    SMP: Allow smp_call_function_single() to current cpu
    i386: Allow smp_call_function_single() to current cpu
    x86_64: Allow smp_call_function_single() to current cpu
    HOTPLUG: Adapt thermal throttle to CPU_DYING
    HOTPLUG: Adapt cpuset hotplug callback to CPU_DYING
    HOTPLUG: Add CPU_DYING notifier
    KVM: Clean up #includes
    KVM: Remove kvmfs in favor of the anonymous inodes source
    KVM: SVM: Reliably detect if SVM was disabled by BIOS
    KVM: VMX: Remove unnecessary code in vmx_tlb_flush()
    KVM: MMU: Fix Wrong tlb flush order
    KVM: VMX: Reinitialize the real-mode tss when entering real mode
    KVM: Avoid useless memory write when possible
    KVM: Fix x86 emulator writeback
    KVM: Add support for in-kernel pio handlers
    KVM: VMX: Fix interrupt checking on lightweight exit
    KVM: Adds support for in-kernel mmio handlers
    ...

    Linus Torvalds
     
  • Pointed out by Michal Schmidt .

    The bug was introduced in 2.6.22 by me.

    cleanup_workqueue_thread() does flush_cpu_workqueue(cwq) in a loop until
    ->worklist becomes empty. This is live-lockable, a re-niced caller can get
    CPU after wake_up() and insert a new barrier before the lower-priority
    cwq->thread has a chance to clear ->current_work.

    Change cleanup_workqueue_thread() to do flush_cpu_workqueue(cwq) only once.
    We can rely on the fact that run_workqueue() won't return until it flushes
    all works. So it is safe to call kthread_stop() after that, the "should
    stop" request won't be noticed until run_workqueue() returns.

    Signed-off-by: Oleg Nesterov
    Cc: Michal Schmidt
    Cc: Srivatsa Vaddagiri
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • KSYM_NAME_LEN is peculiar in that it does not include the space for the
    trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
    buffer. This is nonsense and error-prone. Moreover, when the caller
    forgets that it's very likely to subtly bite back by corrupting the stack
    because the last position of the buffer is always cleared to zero.

    This patch increments KSYM_NAME_LEN by one and updates code accordingly.

    * off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
    is fixed.

    * Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
    MODULE_NAME_LEN was treated as if it didn't include space for the
    trailing '\0'. Fix it.

    Signed-off-by: Tejun Heo
    Acked-by: Paulo Marques
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Add a proper prototype for proc_nr_files() in include/linux/fs.h

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Identical implementations of PTRACE_POKEDATA go into generic_ptrace_pokedata()
    function.

    AFAICS, fix bug on xtensa where successful PTRACE_POKEDATA will nevertheless
    return EPERM.

    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Identical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata()
    function.

    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • If the kernel OOPSed or BUGed then it probably should be considered as
    tainted. Thus, all subsequent OOPSes and SysRq dumps will report the
    tainted kernel. This saves a lot of time explaining oddities in the
    calltraces.

    Signed-off-by: Pavel Emelianov
    Acked-by: Randy Dunlap
    Cc:
    Signed-off-by: Andrew Morton
    [ Added parisc patch from Matthew Wilson -Linus ]
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     
  • Currently, the freezer treats all tasks as freezable, except for the kernel
    threads that explicitly set the PF_NOFREEZE flag for themselves. This
    approach is problematic, since it requires every kernel thread to either
    set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
    care for the freezing of tasks at all.

    It seems better to only require the kernel threads that want to or need to
    be frozen to use some freezer-related code and to remove any
    freezer-related code from the other (nonfreezable) kernel threads, which is
    done in this patch.

    The patch causes all kernel threads to be nonfreezable by default (ie. to
    have PF_NOFREEZE set by default) and introduces the set_freezable()
    function that should be called by the freezable kernel threads in order to
    unset PF_NOFREEZE. It also makes all of the currently freezable kernel
    threads call set_freezable(), so it shouldn't cause any (intentional)
    change of behaviour to appear. Additionally, it updates documentation to
    describe the freezing of tasks more accurately.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: Oleg Nesterov
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • kmalloc_node() and kmem_cache_alloc_node() were not available in a zeroing
    variant in the past. But with __GFP_ZERO it is possible now to do zeroing
    while allocating.

    Use __GFP_ZERO to remove the explicit clearing of memory via memset whereever
    we can.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Huge pages are not movable so are not allocated from ZONE_MOVABLE. However,
    as ZONE_MOVABLE will always have pages that can be migrated or reclaimed, it
    can be used to satisfy hugepage allocations even when the system has been
    running a long time. This allows an administrator to resize the hugepage pool
    at runtime depending on the size of ZONE_MOVABLE.

    This patch adds a new sysctl called hugepages_treat_as_movable. When a
    non-zero value is written to it, future allocations for the huge page pool
    will use ZONE_MOVABLE. Despite huge pages being non-movable, we do not
    introduce additional external fragmentation of note as huge pages are always
    the largest contiguous block we care about.

    [akpm@linux-foundation.org: various fixes]
    Signed-off-by: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     

17 Jul, 2007

6 commits

  • All of the clockevent notifiers expect a pointer to
    an "unsigned int" cpu argument, but hrtimer_cpu_notify()
    passes in a pointer to a long.

    [ Discussed with and ok by Thomas Gleixner ]

    Signed-off-by: David S. Miller
    Signed-off-by: Linus Torvalds

    David Miller
     
  • Randy Dunlap noticed that the recent comment clarifications from Andrew
    had somehow gotten duplicated. Quoth Andrew: "hm, that could have been
    some late-night reject-fixing."

    Fix it up.

    Cc: From: Andrew Morton
    Cc: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
    [PATCH] sched: fix up fs/proc/array.c whitespace problems
    [PATCH] sched: prettify prio_to_wmult[]
    [PATCH] sched: document prio_to_wmult[]
    [PATCH] sched: improve weight-array comments
    [PATCH] sched: remove dead code from task_stime()

    Fixed up trivial conflict in fs/proc/array.c

    Linus Torvalds
     
  • kernel/printk.c: document possible deadlock against scheduler

    The printk's comment states that it can be called from every context,
    which might lead to false illusion that it could be called from everywhere
    without any restrictions.

    This is however not true - a call to printk() could deadlock if called from
    scheduler code (namely from schedule(), wake_up(), etc) on runqueue lock
    when it tries to wake up klogd. Document this.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Kosina
     
  • Now we always use stop_machine for module insertion or deletion, we no
    longer need the modlist_lock: merely disabling preemption is sufficient to
    block against list manipulation. This avoids deadlock on OOPSen where we
    can potentially grab the lock twice.

    Bug: 8695
    Signed-off-by: Rusty Russell
    Cc: Ingo Molnar
    Cc: Tobias Oed
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Change cancel_work_sync() and cancel_delayed_work_sync() to return a boolean
    indicating whether the work was actually cancelled. A zero return value means
    that the work was not pending/queued.

    Without that kind of change it is not possible to avoid flush_workqueue()
    sometimes, see the next patch as an example.

    Also, this patch unifies both functions and kills the (unlikely) busy-wait
    loop.

    Signed-off-by: Oleg Nesterov
    Acked-by: Jarek Poplawski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov