10 Mar, 2007

1 commit

  • This reverts commit 63ce18cfe685115ff8d341bae4c9204a79043cf0.

    It was the incorrect fix and causes a reference counting bug whenever
    any driver module is removed from the system. Mike Galbraith
    is looking for the real fix for his problem.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 Mar, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
    sh: Kill off I/O cruft for R7780RP.
    sh: Revert lazy dcache writeback changes.
    sh: Enable SM501 support for RTS7751R2D.
    sh: Use L1_CACHE_BYTES for .data.cacheline_aligned.
    sysctl: Support vdso_enabled sysctl on SH.
    sh: Fix kernel thread stack corruption with preempt.
    doc: Add SH to vdso and earlyprintk in kernel-parameters.txt
    sh: Fix sigmask trampling in signal delivery.
    sh: Clear UBC when not in use.

    Linus Torvalds
     

07 Mar, 2007

5 commits

  • Update the outdated and inaccurate description of the software suspend in
    Kconfig.

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

    Rafael J. Wysocki
     
  • rcutorture's module parameters currently use permissions of 0, so they
    don't show up in /sys/module/rcutorture/parameters. Change the permissions
    on all module parameters to world-readable (0444).

    rcutorture does all of its initialization and thread startup when loaded
    and relies on the parameters not changing during execution, so they should
    not permit writing. However, reading seems fine.

    Signed-off-by: Josh Triplett
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • I've only seen this on x86_64.

    The vsyscall state only gets updated when a timer interrupts comes in. So
    if the time is set long before the next timer, there will be a period when
    a gettimeofday() won't reflect the correct time.

    I added an explicit update_vsyscall() during the settimeofday(), that way
    the vsyscall state doesn't get stale.

    Signed-off-by: Daniel Walker
    Cc: Thomas Gleixner
    Acked-by: Ingo Molnar
    Acked-by: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Walker
     
  • The TIMER_SOFTIRQ runs the hrtimers during bootup until a usable
    clocksource and clock event sources are registered. The switch to high
    resolution mode happens inside of the TIMER_SOFTIRQ, but runs the softirq
    afterwards. That way the tick emulation timer, which was set up in the
    switch to highres might be executed in the softirq context, which is a BUG.
    The rbtree has not to be touched by the softirq after the highres switch.

    This BUG was observed by Andres Salomon, who provided the information to
    debug it.

    Return early from the softirq, when the switch was sucessful.

    [dilinger@debian.org: add debug warning]
    [akpm@linux-foundation.org: make debug warning compile]
    Signed-off-by: Thomas Gleixner
    Cc: Andres Salomon
    Acked-by: Ingo Molnar
    Signed-off-by: Andres Salomon
    Acked-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • The programming of periodic tick devices needs to be saved/restored
    across suspend/resume - otherwise we might end up with a system coming
    up that relies on getting a PIT (or HPET) interrupt, while those devices
    default to 'no interrupts' after powerup. (To confuse things it worked
    to a certain degree on some systems because the lapic gets initialized
    as a side-effect of SMP bootup.)

    This suspend / resume thing was dropped unintentionally during the
    last-minute -mm code reshuffling.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

05 Mar, 2007

4 commits

  • Doing something like this on a two cpu system

    # echo 0 > /sys/devices/system/cpu/cpu0/online
    # echo 1 > /sys/devices/system/cpu/cpu0/online
    # echo 0 > /sys/devices/system/cpu/cpu1/online

    will give me this:

    =======================================================
    [ INFO: possible circular locking dependency detected ]
    2.6.21-rc2-g562aa1d4-dirty #7
    -------------------------------------------------------
    bash/1282 is trying to acquire lock:
    (&cpu_base->lock_key){.+..}, at: [] hrtimer_cpu_notify+0xc6/0x240

    but task is already holding lock:
    (&cpu_base->lock_key#2){.+..}, at: [] hrtimer_cpu_notify+0xbc/0x240

    which lock already depends on the new lock.

    This happens because we have the following code in kernel/hrtimer.c:

    migrate_hrtimers(int cpu)
    [...]
    old_base = &per_cpu(hrtimer_bases, cpu);
    new_base = &get_cpu_var(hrtimer_bases);
    [...]
    spin_lock(&new_base->lock);
    spin_lock(&old_base->lock);

    Which means the spinlocks are taken in an order which depends on which cpu
    gets shut down from which other cpu. Therefore lockdep complains that there
    might be an ABBA deadlock. Since migrate_hrtimers() gets only called on
    cpu hotplug it's safe to assume that it isn't executed concurrently on a

    The same problem exists in kernel/timer.c: migrate_timers().

    As pointed out by Christian Borntraeger one possible solution to avoid
    the locking order complaints would be to make sure that the locks are
    always taken in the same order. E.g. by taking the lock of the cpu with
    the lower number first.

    To achieve this we introduce two new spinlock functions double_spin_lock
    and double_spin_unlock which lock or unlock two locks in a given order.

    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Roman Zippel
    Cc: John Stultz
    Cc: Christian Borntraeger
    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • This patch resolves the issue found here:
    http://bugme.osdl.org/show_bug.cgi?id=7426

    The basic summary is:
    Currently we register most of i386/x86_64 clocksources at module_init
    time. Then we enable clocksource selection at late_initcall time. This
    causes some problems for drivers that use gettimeofday for init
    calibration routines (specifically the es1968 driver in this case),
    where durring module_init, the only clocksource available is the low-res
    jiffies clocksource. This may cause slight calibration errors, due to
    the small sampling time used.

    It should be noted that drivers that require fine grained time may not
    function on architectures that do not have better then jiffies
    resolution timekeeping (there are a few). However, this does not
    discount the reasonable need for such fine-grained timekeeping at init
    time.

    Thus the solution here is to register clocksources earlier (ideally when
    the hardware is being initialized), and then we enable clocksource
    selection at fs_initcall (before device_initcall).

    This patch should probably get some testing time in -mm, since
    clocksource selection is one of the most important issues for correct
    timekeeping, and I've only been able to test this on a few of my own
    boxes.

    Signed-off-by: John Stultz
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     
  • Remove the SMT-nice feature which idles sibling cpus on SMT cpus to
    facilitiate nice working properly where cpu power is shared. The idling of
    cpus in the presence of runnable tasks is considered too fragile, easy to
    break with outside code, and the complexity of managing this system if an
    architecture comes along with many logical cores sharing cpu power will be
    unworkable.

    Remove the associated per_cpu_gain variable in sched_domains used only by
    this code.

    Also:

    The reason is that with dynticks enabled, this code breaks without yet
    further tweaks so dynticks brought on the rapid demise of this code. So
    either we tweak this code or kill it off entirely. It was Ingo's preference
    to kill it off. Either way this needs to happen for 2.6.21 since dynticks
    has gone in.

    Signed-off-by: Con Kolivas
    Acked-by: Ingo Molnar
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Con Kolivas
     
  • All of the logic for this was already in place, we just hadn't wired it
    up in the sysctl table.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

02 Mar, 2007

6 commits

  • The SMT scheduler incorrectly skips kernel threads even if they are
    runnable (but they are preempted by a higher-prio user-space task which got
    SMT-delayed by an even higher-priority task running on a sibling CPU).

    Fix this for now by only doing the SMT-nice optimization if the
    to-be-delayed task is the only runnable task. (This should cover most of
    the real-life cases anyway.)

    This bug has been in the SMT scheduler since 2.6.17 or so, but has only
    been noticed now by the active check in the dynticks code.

    Signed-off-by: Ingo Molnar
    Cc: Michal Piotrowski
    Cc: Nick Piggin
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • lockdep_init() is marked __init but used in several places
    outside __init code. This causes following warnings:
    $ scripts/mod/modpost kernel/lockdep.o
    WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_init_map after 'lockdep_init_map' (at offset 0x105)
    WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_reset_lock after 'lockdep_reset_lock' (at offset 0x35)
    WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.__lock_acquire after '__lock_acquire' (at offset 0xb2)

    The warnings are less obviously due to heavy inlining by gcc - this is not
    altered.

    Fix the section mismatch warnings by removing the __init marking, which
    seems obviously wrong.

    Signed-off-by: Sam Ravnborg
    Acked-by: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     
  • /home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/kernel/sysctl.c:1411: error: conflicting types for 'register_sysctl_table'
    /home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/include/linux/sysctl.h:1042: error: previous declaration of 'register_sysctl_table' was here
    make[2]: *** [kernel/sysctl.o] Error 1

    Caused by commit 0b4d414714f0d2f922d39424b0c5c82ad900a381.

    Signed-off-by: Adrian Bunk
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Problem description at:
    http://bugzilla.kernel.org/show_bug.cgi?id=8048

    Commit b18ec80396834497933d77b81ec0918519f4e2a7
    [PATCH] sched: improve migration accuracy
    optimized the scheduler time calculations, but broke posix-cpu-timers.

    The problem is that the p->last_ran value is not updated after a context
    switch. So a subsequent call to current_sched_time() calculates with a
    stale p->last_ran value, i.e. accounts the full time, which the task was
    scheduled away.

    Signed-off-by: Thomas Gleixner
    Acked-by: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Fix kernel-doc warnings in 2.6.20-git15 (lib/, mm/, kernel/, include/).

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

    Randy Dunlap
     
  • Signed-off-by: Daniel Walker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Walker
     

27 Feb, 2007

6 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
    [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
    [PARISC] Add missing statfs64 and fstatfs64 syscalls
    Revert "[PARISC] Optimize TLB flush on SMP systems"
    [PARISC] Compat signal fixes for 64-bit parisc
    [PARISC] Reorder syscalls to match unistd.h
    Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
    [PARISC] fix sys_rt_sigqueueinfo
    [PARISC] fix section mismatch warnings in harmony sound driver
    [PARISC] do not export get_register/set_register
    [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
    [PARISC] convert to use CONFIG_64BIT instead of __LP64__
    [PARISC] use CONFIG_64BIT instead of __LP64__
    [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
    [PARISC] more ENTRY(), ENDPROC(), END() conversions
    [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
    [PARISC] Fixes /proc/cpuinfo cache output on B160L
    [PARISC] implement standard ENTRY(), END() and ENDPROC()
    [PARISC] kill ENTRY_SYS_CPUS
    [PARISC] clean up debugging printks in smp.c
    [PARISC] factor syscall_restart code out of do_signal
    ...

    Fix conflict in include/linux/sched.h due to kill_proc_info() being made
    publicly available to PARISC again.

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/tick-2.6:
    [TICK] tick-common: Fix one-shot handling in tick_handle_periodic().
    [TIME] tick-sched: Add missing asm/irq_regs.h include.

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
    Revert "Driver core: let request_module() send a /sys/modules/kmod/-uevent"
    Driver core: fix error by cleanup up symlinks properly
    make kernel/kmod.c:kmod_mk static
    power management: fix struct layout and docs
    power management: no valid states w/o pm_ops
    Driver core: more fallout from class_device changes for pcmcia
    sysfs: move struct sysfs_dirent to private header
    driver core: refcounting fix
    Driver core: remove class_device_rename

    Linus Torvalds
     
  • When clockevents_program_event() is given an expire time in the
    past, it does not update dev->next_event, so this looping code
    would loop forever once the first in-the-past expiration time
    was used.

    Keep advancing "next" locally to fix this bug.

    Acked-by: Thomas Gleixner
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Acked-by: Thomas Gleixner
    Signed-off-by: David S. Miller

    David S. Miller
     
  • move_native_irqs tries to do the right thing when migrating irqs
    by disabling them. However disabling them is a software logical
    thing, not a hardware thing. This has always been a little flaky
    and after Ingo's latest round of changes it is guaranteed to not
    mask the apic.

    So this patch fixes move_native_irq to directly call the mask and
    unmask chip methods to guarantee that we mask the irq when we
    are migrating it. We must do this as it is required by
    all code that call into the path.

    Since we don't know the masked status when IRQ_DISABLED is
    set so we will not be able to restore it. The patch makes the code
    just give up and trying again the next time this routing is called.

    Signed-off-by: Eric W. Biederman
    Acked-by: Suresh Siddha
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

24 Feb, 2007

4 commits


21 Feb, 2007

2 commits

  • In __lock_acquire check_chain_key can turn off debug_locks, so check is
    needed to assure proper return code.

    Signed-off-by: Jarek Poplawski
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarek Poplawski
     
  • This patch lists all active probes in the system by scanning through
    kprobe_table[]. It takes care of aggregate handlers and prints the type of
    the probe. Letter "k" for kprobes, "j" for jprobes, "r" for kretprobes.
    It also lists address of the instruction,its symbolic name(function name +
    offset) and the module name. One can access this file through
    /sys/kernel/debug/kprobes/list.

    Output looks like this
    =====================
    llm40:~/a # cat /sys/kernel/debug/kprobes/list
    c0169ae3 r sys_read+0x0
    c0169ae3 k sys_read+0x0
    c01694c8 k vfs_write+0x0
    c0167d20 r sys_open+0x0
    f8e658a6 k reiserfs_delete_inode+0x0 reiserfs
    c0120f4a k do_fork+0x0
    c0120f4a j do_fork+0x0
    c0169b4a r sys_write+0x0
    c0169b4a k sys_write+0x0
    c0169622 r vfs_read+0x0
    =================================

    [akpm@linux-foundation.org: cleanup]
    [ananth@in.ibm.com: sparc build fix]
    Signed-off-by: Srinivasa DS
    Cc: Prasanna S Panchamukhi
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Srinivasa Ds
     

20 Feb, 2007

4 commits

  • The BUG_ON() in tick_nohz_stop_sched_tick() triggers on some boxen.
    Remove the BUG_ON and print information about the pending softirq
    to allow better debugging of the problem.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • When a CPU is needed for RCU the tick has to continue even when it was
    stopped before.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • * 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
    [PATCH] AUDIT_FD_PAIR
    [PATCH] audit config lockdown
    [PATCH] minor update to rule add/delete messages (ver 2)

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits)
    Documentation/kernel-docs.txt update.
    arch/cris: typo in KERN_INFO
    Storage class should be before const qualifier
    kernel/printk.c: comment fix
    update I/O sched Kconfig help texts - CFQ is now default, not AS.
    Remove duplicate listing of Cris arch from README
    kbuild: more doc. cleanups
    doc: make doc. for maxcpus= more visible
    drivers/net/eexpress.c: remove duplicate comment
    add a help text for BLK_DEV_GENERIC
    correct a dead URL in the IP_MULTICAST help text
    fix the BAYCOM_SER_HDX help text
    fix SCSI_SCAN_ASYNC help text
    trivial documentation patch for platform.txt
    Fix typos concerning hierarchy
    Fix comment typo "spin_lock_irqrestore".
    Fix misspellings of "agressive".
    drivers/scsi/a100u2w.c: trivial typo patch
    Correct trivial typo in log2.h.
    Remove useless FIND_FIRST_BIT() macro from cardbus.c.
    ...

    Linus Torvalds
     

18 Feb, 2007

4 commits

  • Provide an audit record of the descriptor pair returned by pipe() and
    socketpair(). Rewritten from the original posted to linux-audit by
    John D. Ramsdell

    Signed-off-by: Al Viro

    Al Viro
     
  • The following patch adds a new mode to the audit system. It uses the
    audit_enabled config option to introduce the idea of audit enabled, but
    configuration is immutable. Any attempt to change the configuration
    while in this mode is audited. To change the audit rules, you'd need to
    reboot the machine.

    To use this option, you'd need a modified version of auditctl and use "-e 2".
    This is intended to go at the end of the audit.rules file for people that
    want an immutable configuration.

    This patch also adds "res=" to a number of configuration commands that did not
    have it before.

    Signed-off-by: Steve Grubb
    Signed-off-by: Al Viro

    Steve Grubb
     
  • I was looking at parsing some of these messages and found that I wanted what
    it was doing next to an op= for the parser to key on. Also missing was the list
    number and results.

    Signed-off-by: Steve Grubb
    Signed-off-by: Al Viro

    Steve Grubb
     
  • Signed-off-by: Patrick Pletscher
    Signed-off-by: Adrian Bunk

    Patrick Pletscher
     

17 Feb, 2007

3 commits