07 Oct, 2010

5 commits


06 Oct, 2010

5 commits

  • Since powerpc uses -Werror on arch powerpc, the build was broken like
    this:

    cc1: warnings being treated as errors
    arch/powerpc/kernel/module.c: In function 'module_finalize':
    arch/powerpc/kernel/module.c:66: error: unused variable 'err'

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    rcu: rcu_read_lock_bh_held(): disabling irqs also disables bh
    generic-ipi: Fix deadlock in __smp_call_function_single

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf trace scripting: Fix extern struct definitions
    perf ui hist browser: Fix segfault on 'a' for annotate
    perf tools: Fix build breakage
    perf, x86: Handle in flight NMIs on P4 platform
    oprofile, ARM: Release resources on failure
    oprofile: Add Support for Intel CPU Family 6 / Model 29

    Linus Torvalds
     
  • The "flags" member of "struct wait_queue_t" is used in several places in
    the kernel code without beeing initialized by init_wait(). "flags" is
    used in bitwise operations.

    If "flags" not initialized then unexpected behaviour may take place.
    Incorrect flags might used later in code.

    Added initialization of "wait_queue_t.flags" with zero value into
    "init_wait".

    Signed-off-by: Evgeny Kuznetsov
    [ The bit we care about does end up being initialized by both
    prepare_to_wait() and add_to_wait_queue(), so this doesn't seem to
    cause actual bugs, but is definitely the right thing to do -Linus ]
    Signed-off-by: Linus Torvalds

    Evgeny Kuznetsov
     
  • With all the recent module loading cleanups, we've minimized the code
    that sits under module_mutex, fixing various deadlocks and making it
    possible to do most of the module loading in parallel.

    However, that whole conversion totally missed the rather obscure code
    that adds a new module to the list for BUG() handling. That code was
    doubly obscure because (a) the code itself lives in lib/bugs.c (for
    dubious reasons) and (b) it gets called from the architecture-specific
    "module_finalize()" rather than from generic code.

    Calling it from arch-specific code makes no sense what-so-ever to begin
    with, and is now actively wrong since that code isn't protected by the
    module loading lock any more.

    So this commit moves the "module_bug_{finalize,cleanup}()" calls away
    from the arch-specific code, and into the generic code - and in the
    process protects it with the module_mutex so that the list operations
    are now safe.

    Future fixups:
    - move the module list handling code into kernel/module.c where it
    belongs.
    - get rid of 'module_bug_list' and just use the regular list of modules
    (called 'modules' - imagine that) that we already create and maintain
    for other reasons.

    Reported-and-tested-by: Thomas Gleixner
    Cc: Rusty Russell
    Cc: Adrian Bunk
    Cc: Andrew Morton
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 Oct, 2010

30 commits

  • if !xen_have_vector_callback do not initialize PV timer unconditionally
    because we still don't know how many cpus are available and if there is
    more than one we won't be able to receive the timer interrupts on
    cpu > 0.

    This patch fixes an hang at boot when Xen does not support vector
    callbacks and the guest has multiple vcpus.

    Signed-off-by: Stefano Stabellini
    Acked-by: Jeremy Fitzhardinge

    Stefano Stabellini
     
  • Register_xenstore_notifier should guarantee that the caller gets
    notified even if xenstore is already up.
    Therefore we revert "do not notify callers from
    register_xenstore_notifier" and set xenstored_read at the right time for
    PV on HVM guests too.
    In fact in case of PV on HVM guests xenstored is ready only after the
    platform pci driver has completed the initialization, so do not set
    xenstored_ready before the call to xenbus_probe().

    This patch fixes a shutdown_event watcher registration bug that causes
    "xm shutdown" not to work properly.

    Signed-off-by: Stefano Stabellini
    Acked-by: Jeremy Fitzhardinge

    Stefano Stabellini
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
    regulator: max8649 - fix setting extclk_freq
    regulator: fix typo in current units
    regulator: fix device_register() error handling

    Linus Torvalds
     
  • * 'merge-powerpc' of git://git.secretlab.ca/git/linux-2.6:
    powerpc/5200: tighten up ac97 reset timing
    powerpc/5200: efika.c: Add of_node_put to avoid memory leak
    powerpc/512x: fix clk_get() return value

    Linus Torvalds
     
  • * 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: i2c/other/ak4xx-adda: Fix a compile warning with CONFIG_PROCFS=n
    ALSA: prevent heap corruption in snd_ctl_new()

    Linus Torvalds
     
  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
    hwmon: f71882fg: use a muxed resource lock for the Super I/O port

    Linus Torvalds
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
    [CPUFREQ] Fix memory leaks in pcc_cpufreq_do_osc
    [CPUFREQ] acpi-cpufreq: add missing __percpu markup

    Linus Torvalds
     
  • * 'merge-spi' of git://git.secretlab.ca/git/linux-2.6:
    of/spi: Fix OF-style driver binding of spi devices
    spi: spi-gpio.c tests SPI_MASTER_NO_RX bit twice, but not SPI_MASTER_NO_TX
    spi/mpc8xxx: fix buffer overrun on large transfers

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    vlan: dont drop packets from unknown vlans in promiscuous mode
    Phonet: Correct header retrieval after pskb_may_pull
    um: Proper Fix for f25c80a4: remove duplicate structure field initialization
    ip_gre: Fix dependencies wrt. ipv6.
    net-2.6: SYN retransmits: Add new parameter to retransmits_timed_out()
    iwl3945: queue the right work if the scan needs to be aborted
    mac80211: fix use-after-free

    Linus Torvalds
     
  • * 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel:
    drm/i915: Rephrase pwrite bounds checking to avoid any potential overflow
    drm/i915: Sanity check pread/pwrite
    drm/i915: Use pipe state to tell when pipe is off
    drm/i915: vblank status not valid while training display port
    drivers/gpu/drm/i915/i915_gem.c: Add missing error handling code
    drm/i915: Fix refleak during eviction.
    drm/i915: fix GMCH power reporting

    Linus Torvalds
     
  • Building under memory pressure, with KSM on 2.6.36-rc5, collapsed with
    an internal compiler error: typically indicating an error in swapping.

    Perhaps there's a timing issue which makes it now more likely, perhaps
    it's just a long time since I tried for so long: this bug goes back to
    KSM swapping in 2.6.33.

    Notice how reuse_swap_page() allows an exclusive page to be reused, but
    only does SetPageDirty if it can delete it from swap cache right then -
    if it's currently under Writeback, it has to be left in cache and we
    don't SetPageDirty, but the page can be reused. Fine, the dirty bit
    will get set in the pte; but notice how zap_pte_range() does not bother
    to transfer pte_dirty to page_dirty when unmapping a PageAnon.

    If KSM chooses to share such a page, it will look like a clean copy of
    swapcache, and not be written out to swap when its memory is needed;
    then stale data read back from swap when it's needed again.

    We could fix this in reuse_swap_page() (or even refuse to reuse a
    page under writeback), but it's more honest to fix my oversight in
    KSM's write_protect_page(). Several days of testing on three machines
    confirms that this fixes the issue they showed.

    Signed-off-by: Hugh Dickins
    Cc: Andrew Morton
    Cc: Andrea Arcangeli
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • 2.6.36-rc1 commit 21d0d443cdc1658a8c1484fdcece4803f0f96d0e "rmap:
    resurrect page_address_in_vma anon_vma check" was right to resurrect
    that check; but now that it's comparing anon_vma->roots instead of
    just anon_vmas, there's a danger of oopsing on a NULL anon_vma.

    In most cases no NULL anon_vma ever gets here; but it turns out that
    occasionally KSM, when enabled on a forked or forking process, will
    itself call page_address_in_vma() on a "half-KSM" page left over from
    an earlier failed attempt to merge - whose page_anon_vma() is NULL.

    It's my bug that those should be getting here at all: I thought they
    were already dealt with, this oops proves me wrong, I'll fix it in
    the next release - such pages are effectively pinned until their
    process exits, since rmap cannot find their ptes (though swapoff can).

    For now just work around it by making page_address_in_vma() safe (and
    add a comment on why that check is wanted anyway). A similar check
    in __page_check_anon_rmap() is safe because do_page_add_anon_rmap()
    already excluded KSM pages.

    Signed-off-by: Hugh Dickins
    Cc: Andrew Morton
    Cc: Andrea Arcangeli
    Cc: Rik van Riel
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • It is an early_initcall, so it should be in __init memory.

    Signed-off-by: David Daney
    To: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1593/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • The notifiers may be called at any time, so the notifier_block cannot
    be in init memory.

    Signed-off-by: David Daney
    To: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1592/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • Fix VMLINUZ_LOAD_ADDRESS calculation to be based on the length of
    vmlinux.bin, the actual uncompressed kernel binary.

    Previously it was based on the length of KBUILD_IMAGE (the unstripped ELF
    vmlinux), which is bigger than vmlinux.bin. As a result, vmlinuz was
    loaded into a memory address higher then actually needed - a problem for
    small memory platforms.

    Signed-off-by: Shmulik Ladkani
    To: linux-mips@linux-mips.org
    Cc: alex@digriz.org.uk
    Cc: manuel.lauss@googlemail.com
    Cc: sam@ravnborg.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/1564/
    Acked-by: Wu Zhangjin
    Signed-off-by: Ralf Baechle

    Shmulik Ladkani
     
  • The function prom_init_cmdline() references the variable __initdata
    arcs_cmdline.

    The function prom_get_ethernet_addr() references the variable __initdata
    arcs_cmdline.

    Annotate prom_init_cmdline() as __init, unexport and annotate
    prom_get_ethernet_addr() since it's no longer called from within
    driver code.

    Signed-off-by: Manuel Lauss
    To: Linux-MIPS
    Patchwork: https://patchwork.linux-mips.org/patch/1547/
    Signed-off-by: Ralf Baechle

    Manuel Lauss
     
  • Noticed and original patch by Philby John .

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Signed-off-by: David Daney
    To: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1553/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • Architectures need to set ARCH_DMA_MINALIGN to the minimum DMA
    alignment (commit a6eb9fe105d5de0053b261148cee56c94b4720ca). Defining
    ARCH_KMALLOC_MINALIGN doesn't work anymore.

    Signed-off-by: FUJITA Tomonori
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Cc: anemo@mba.ocn.ne.jp
    Patchwork: https://patchwork.linux-mips.org/patch/1544/
    Acked-by: Atsushi Nemoto
    Signed-off-by: Ralf Baechle

    FUJITA Tomonori
     
  • Commit 31c984a5acabea5d8c7224dc226453022be46f33 introduced a new syscall
    getdents64. However, in the syscall table, the new syscall still refers to
    the old getdents which doesn't work.

    The problem appeared with a system that uses the eglibc 2.12-r11187 (that
    utilizes that new syscall) is very confused. The fix has been tested with
    that eglibc version.

    Signed-off-by: Bernhard Walle
    To: linux-mips@linux-mips.org
    Cc: ddaney@caviumnetworks.com
    Cc: akpm@linux-foundation.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/1567/
    Signed-off-by: Ralf Baechle

    Bernhard Walle
     
  • These would result in KERN_ actually getting printed.

    Signed-off-by: Joe Perches
    To: Jiri Kosina
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/1581/
    Signed-off-by: Ralf Baechle

    Joe Perches
     
  • No rubbish printks - those belong to userspace. The halt function now
    actually halts the system and the poweroff function was deleted because
    it didn't actually power down the system.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • This prevents the GIC code from being reusable sanely.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Only VSMP was known as SMVP and generally the help text was too short to
    be helpful.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • This only matters for ISA devices with a 24-bit DMA limit or for devices
    with a 32-bit DMA limit on systems with ZONE_DMA32 enabled. The latter
    currently only affects 32-bit PCI cards on Sibyte-based systems with more
    than 1GB RAM installed.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • _TIF_WORK_MASK false had _TIF_SYSCALL_AUDIT set. If a thread's
    _TIF_SYSCALL_AUDIT is ever set this will lead to an endless loop on the
    way out from a syscall.

    Currently this is only a theoretic bug as init/Kconfig doesn't allow
    AUDIT_SYSCALL to be enabled for MIPS.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • This patch adds an config switch to determine if we need to build some
    workaround helper files.

    The staging driver octeon-ethernet references some symbols which are only
    built when PCI is enabled. The new config switch enables these symbols in
    bothe cases.

    Signed-off-by: Andreas Bießmann
    To: linux-kernel@vger.kernel.org
    Cc: Andreas Bießmann
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1543/
    Acked-by: David Daney
    Signed-off-by: Ralf Baechle

    Andreas Bießmann
     
  • The 64-bit kernel has already had its atomic64 functions. Except for that,
    we use the generic spinlocked version. The atomic64 types and related
    functions are needed for the Linux performance counter subsystem.

    Signed-off-by: Deng-Cheng Zhu
    To: linux-mips@linux-mips.org
    Cc: a.p.zijlstra@chello.nl
    Cc: paulus@samba.org
    Cc: mingo@elte.hu
    Cc: acme@redhat.com
    Cc: jamie.iles@picochip.com
    Patchwork: https://patchwork.linux-mips.org/patch/1361/
    Acked-by: David Daney
    Signed-off-by: Ralf Baechle

    Deng-Cheng Zhu
     
  • Signed-off-by: Ricardo Mendoza
    To: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1540/
    Signed-off-by: Ralf Baechle

    Ricardo Mendoza