13 Mar, 2009

3 commits

  • The RPA PCI hotplug driver calls EEH routines, so should depend on
    EEH. Also PPC_PSERIES implies PPC64, so remove that.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Matthew Wilcox

    Michael Ellerman
     
  • Commit 47a8b0cc (Enable PCIe AER only after checking firmware
    support) wants to walk the PCI bus in the remove path to disable
    AER, and calls pci_walk_bus for downstream bridges.

    Unfortunately, in the remove path, we remove devices and bridges
    in a depth-first manner, starting with the furthest downstream
    bridge and working our way backwards.

    The furthest downstream bridges will not have a dev->subordinate,
    and we hit a NULL deref in pci_walk_bus.

    Check for dev->subordinate first before attempting to walk the
    PCI hierarchy below us.

    Acked-by: Andrew Patterson
    Signed-off-by: Alex Chiang
    Signed-off-by: Matthew Wilcox

    Alex Chiang
     
  • This patch is intended to disable L0s ASPM link state for 82598 (ixgbe)
    parts due to the fact that it is possible to corrupt TX data when coming
    back out of L0s on some systems. The workaround had been added for 82575
    (igb) previously, but did not use the ASPM api. This quirk uses the ASPM
    api to prevent the ASPM subsystem from re-enabling the L0s state.

    Instead of adding the fix in igb to the ixgbe driver as well it was
    decided to move it into a pci quirk. It is necessary to move the fix out
    of the driver and into a pci quirk in order to prevent the issue from
    occuring prior to driver load to handle the possibility of the device being
    passed to a VM via direct assignment.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    CC: Jesse Barnes
    Signed-off-by: Matthew Wilcox

    Alexander Duyck
     

11 Mar, 2009

18 commits

  • Prevent the kernel from being crashed by a divide-by-zero operation when
    supplied an incorrectly filled 'struct fb_var_screeninfo' from userland.

    Previously i810_main.c:1005 (i810_check_params) was using the global
    'yres' symbol previously defined at i810_main.c:145 as a module parameter
    value holder (i810_main.c:2174). If i810fb is compiled-in or if this
    param doesn't get a default value, this direct usage leads to a
    divide-by-zero at i810_main.c:1005 (i810_check_params). The patch simply
    replace the 'yres' global, perhaps undefined symbol usage by a given
    parameter structure lookup.

    This problem occurs with directfb, mplayer -vo fbdev, SDL library.
    It was also reported ( but non solved ) at:

    http://mail.directfb.org/pipermail/directfb-dev/2008-March/004050.html

    Signed-off-by: Samuel CUELLA
    Cc: Jiri Kosina
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samuel CUELLA
     
  • There isn't any mcfqspi.h in the tree, and without it everything inside the
    #ifdef CONFIG_SPI is uncompilable.

    Signed-off-by: Steven King
    Acked-by: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven King
     
  • Signed-off-by: Steven King
    Acked-by: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven King
     
  • Update the RCU documentation to call out the need for callers of
    primitives like call_rcu() and synchronize_rcu() to prevent subsequent RCU
    readers from hazard.

    Signed-off-by: Paul E. McKenney
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • We were returning early in the sysfs directory cleanup function if the
    user belonged to a non init usernamespace. Due to this a lot of the
    cleanup was not done and we were left with a leak. Fix the leak.

    Reported-by: Serge Hallyn
    Signed-off-by: Dhaval Giani
    Acked-by: Serge Hallyn
    Tested-by: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dhaval Giani
     
  • commit e480814f138cd5d78a8efe397756ba6b6518fdb6 ("[MTD] [MAPS] physmap:
    fix wrong free and del_mtd_{partition,device}") introduces a NULL pointer
    dereference in physmap_flash_remove when called from the error path in
    physmap_flash_probe (if map_probe failed).

    Call del_mtd_{partition,device} only if info->cmtd was not NULL.

    Reported-by: pHilipp Zabel
    Signed-off-by: Atsushi Nemoto
    Cc: David Woodhouse
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • When GTT size is equal to amount of video memory, the amount of GTT
    entries is computed lower than zero, which is invalid and leads to
    off-by-one error in intel_i915_configure()

    Originally posted here:
    http://bugzilla.kernel.org/show_bug.cgi?id=12539
    http://bugzilla.redhat.com/show_bug.cgi?id=445592

    Signed-off-by: Lubomir Rintel
    Cc: Lubomir Rintel
    Cc: Dave Airlie
    Reviewed-by: Eric Anholt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lubomir Rintel
     
  • Commit 771999b65f79264acde4b855e5d35696eca5e80c ("[MTD] DataFlash: bugfix,
    binary page sizes now handled") broke support for probing AT45DB321C flash
    chips. These chips do not support the "page size" status bit, so if we
    match the JEDEC id return early.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Will Newton
    Cc: David Woodhouse
    Acked-by: David Brownell
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Newton
     
  • Fix a problem in the IDR system, where an idr_remove_all() hands a data
    element to call_rcu() (via free_layer()) before making that data element
    inaccessible to new readers. This is very bad, and results in readers
    still having a reference to this data element at the end of the grace
    period.

    Tests on large machines that concurrently map and unmap user-space memory
    within the same multithreaded process result in crashes within about five
    minutes. Applying this patch increases the kernel's longevity to the
    three-to-eight-hour range.

    There appear to be other similar problems in idr_get_empty_slot() and
    sub_remove(), but I fixed the easy one in idr_remove_all() first. It is
    therefore no surprise that failures still occur.

    Located-by: Milton Miller II
    Tested-by: Milton Miller II
    Signed-off-by: Paul E. McKenney
    Cc: Manfred Spraul
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • Very annoying when working with containters.

    Signed-off-by: Alexey Dobriyan
    Cc: Alan Cox
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Impact: fix bug to make agp work with dri

    Jeffrey reported that dri does work with 64bit, but doesn't work with
    32bit it turns out NB aperture is 32M, aperture on agp is 128M

    64bit is using 64M for vaidation for 64 iommu/gart 32bit is only using
    32M..., and will not update the nb aperture.

    So try to compare nb apterture and agp apterture before leaving not
    touch nb aperture.

    Reported-by: Jeffrey Trull
    Tested-by: Jeffrey Trull
    Signed-off-by: Yinghai Lu
    Acked-by: Dave Airlie
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     
  • * ->put_char changes
    * HIGHMEM is bogus it seems, there is no kmap_atomic() et al
    * some includes

    Signed-off-by: Alexey Dobriyan
    Acked-by: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • The adt7468 chip supports VRM10 sensors just like the adt7463; add a
    missing check for it.

    Signed-off-by: Darrick J. Wong
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong
     
  • The verstep check in the lm85 driver fails because the upper nibble of
    the version register is 0x7, not 0x6, on the adt7468 chip. Probing of
    all adt7468s was broken by 69fc1feba2d5856ff74dedb6ae9d8c490210825c
    ("hwmon: (lm85) Rework the device detection"), and this patch fixes
    that. Also add in a missing i2c_device_id that accidentally got dropped
    from the original patch.

    Signed-off-by: Darrick J. Wong
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong
     
  • The COMPAT_BRK kconfig symbol does not depend on EMBEDDED, but it is in
    the midst of the EMBEDDED menu symbols, so it mucks up the EMBEDDED menu.
    Fix by moving it to just after all of the EMBEDDED menu symbols. Also,
    ANON_INODES has a similar problem, so move it to just above the EMBEDDED
    menu items since it is used in the EMBEDDED menu.

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

    Randy Dunlap
     
  • get_nid_for_pfn() returns int

    Presumably the (nid < 0) case has never happened.

    We do know that it is happening on one system while creating a symlink for
    a memory section so it should also happen on the same system if
    unregister_mem_sect_under_nodes() were called to remove the same symlink.

    The test was actually added in response to a problem with an earlier
    version reported by Yasunori Goto where one or more of the leading pages
    of a memory section on the 2nd node of one of his systems was
    uninitialized because I believe they coincided with a memory hole.

    That earlier version did not ignore uninitialized pages and determined
    the nid by considering only the 1st page of each memory section. This
    caused the symlink to the 1st memory section on the 2nd node to be
    incorrectly created in /sys/devices/system/node/node0 instead of
    /sys/devices/system/node/node1. The problem was fixed by adding the
    test to skip over uninitialized pages.

    I suspect we have not seen any reports of the non-removal
    of a symlink due to the incorrect declaration of the nid
    variable in unregister_mem_sect_under_nodes() because
    - systems where a memory section could have an uninitialized
    range of leading pages are probably rare.
    - memory remove is probably not done very frequently on the
    systems that are capable of demonstrating the problem.
    - lingering symlink(s) that should have been removed may
    have simply gone unnoticed.

    [garyhade@us.ibm.com: wrote changelog]
    Signed-off-by: Roel Kluin
    Cc: Gary Hade
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86 mmiotrace: fix remove_kmmio_fault_pages()

    Linus Torvalds
     
  • * 'sh/for-2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
    video: deferred io cleanup fix for sh_mobile_lcdcfb
    sh: Add media/soc_camera.h to board setup of Renesas AP325RXA

    Linus Torvalds
     

10 Mar, 2009

10 commits


09 Mar, 2009

9 commits

  • btrfs_tree_locked was being used to make sure a given extent_buffer was
    properly locked in a few places. But, it wasn't correct for UP compiled
    kernels.

    This switches it to using assert_spin_locked instead, and renames it to
    btrfs_assert_tree_locked to better reflect how it was really being used.

    Signed-off-by: Chris Mason

    Chris Mason
     
  • Frans Pop reported the crash below when running an s390 kernel under Hercules:

    Kernel BUG at 000738b4 verbose debug info unavailable!
    fixpoint divide exception: 0009 #1! SMP
    Modules linked in: nfs lockd nfs_acl sunrpc ctcm fsm tape_34xx
    cu3088 tape ccwgroup tape_class ext3 jbd mbcache dm_mirror dm_log dm_snapshot
    dm_mod dasd_eckd_mod dasd_mod
    CPU: 0 Not tainted 2.6.27.19 #13
    Process awk (pid: 2069, task: 0f9ed9b8, ksp: 0f4f7d18)
    Krnl PSW : 070c1000 800738b4 (acct_update_integrals+0x4c/0x118)
    R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0
    Krnl GPRS: 00000000 000007d0 7fffffff fffff830
    00000000 ffffffff 00000002 0f9ed9b8
    00000000 00008ca0 00000000 0f9ed9b8
    0f9edda4 8007386e 0f4f7ec8 0f4f7e98
    Krnl Code: 800738aa: a71807d0 lhi %r1,2000
    800738ae: 8c200001 srdl %r2,1
    800738b2: 1d21 dr %r2,%r1
    >800738b4: 5810d10e l %r1,270(%r13)
    800738b8: 1823 lr %r2,%r3
    800738ba: 4130f060 la %r3,96(%r15)
    800738be: 0de1 basr %r14,%r1
    800738c0: 5800f060 l %r0,96(%r15)
    Call Trace:
    ( ! blocking_notifier_call_chain+0x1e/0x2c)
    ! do_exit+0x106/0x7c0
    ! do_group_exit+0x7a/0xb4
    ! SyS_exit_group+0x1e/0x30
    ! sysc_do_restart+0x12/0x16
    ! 0x77e7e924

    Reason for this is that cpu time accounting usually only happens from
    interrupt context, but acct_update_integrals gets also called from
    process context with interrupts enabled.

    So in acct_update_integrals we may end up with the following scenario:

    Between reading tsk->stime/tsk->utime and tsk->acct_timexpd an interrupt
    happens which updates accouting values. This causes acct_timexpd to be
    greater than the former stime + utime. The subsequent calculation of

    dtime = cputime_sub(time, tsk->acct_timexpd);

    will be negative and the division performed by

    cputime_to_jiffies(dtime)

    will generate an exception since the result won't fit into a 32 bit
    register.

    In order to fix this just always disable interrupts while accessing any
    of the accounting values.

    Reported by: Frans Pop
    Tested by: Frans Pop
    Cc: stable@kernel.org
    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Impact: remove lots of lguest boot WARN_ON() when CONFIG_SPARSE_IRQ=y

    We now need to call irq_to_desc_alloc_cpu() before
    set_irq_chip_and_handler_name(), but we can't do that from init_IRQ (no
    kmalloc available).

    So do it as we use interrupts instead. Also means we only alloc for
    irqs we use, which was the intent of CONFIG_SPARSE_IRQ anyway.

    Signed-off-by: Rusty Russell
    Cc: Ingo Molnar

    Rusty Russell
     
  • Impact: fix lguest boot crash on modern Intel machines

    The code in early_init_intel does:

    if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) {
    u64 misc_enable;

    rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable);

    And that rdmsr faults (not allowed from non-0 PL). We can get around
    this by mugging the family ID part of the cpuid. 5 seems like a good
    number.

    Of course, this is a hack (how very lguest!). We could just indicate
    that we don't support MSRs, or implement lguest_rdmst.

    Reported-by: Patrick McHardy
    Signed-off-by: Rusty Russell
    Tested-by: Patrick McHardy

    Rusty Russell
     
  • Impact: fix race+crash in mmiotrace

    The list manipulation in remove_kmmio_fault_pages() was broken. If more
    than one consecutive kmmio_fault_page was re-added during the grace
    period between unregister_kmmio_probe() and remove_kmmio_fault_pages(),
    the list manipulation failed to remove pages from the release list.

    After a second grace period the pages get into rcu_free_kmmio_fault_pages()
    and raise a BUG_ON() kernel crash.

    The list manipulation is fixed to properly remove pages from the release
    list.

    This bug has been present from the very beginning of mmiotrace in the
    mainline kernel. It was introduced in 0fd0e3da ("x86: mmiotrace full
    patch, preview 1");

    An urgent fix for Linus. Tested by Stuart (on 32-bit) and Pekka
    (on amd and intel 64-bit systems, nouveau and nvidia proprietary).

    Signed-off-by: Stuart Bennett
    Signed-off-by: Pekka Paalanen
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stuart Bennett
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
    mmc: fix data timeout for SEND_EXT_CSD

    Linus Torvalds
     
  • …/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: increment quiescent state counter in ksoftirqd()

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

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, pebs: correct qualifier passed to ds_write_config() from ds_request_pebs()
    x86, bts: remove bad warning
    x86: add Dell XPS710 reboot quirk
    x86, math-emu: fix init_fpu for task != current
    x86: EFI: Back efi_ioremap with init_memory_mapping instead of FIX_MAP
    x86: fix DMI on EFI

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    [WATCHDOG] orion5x_wdt.c: 'ORION5X_TCLK' undeclared
    [WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed
    [WATCHDOG] ks8695_wdt.c: 'CLOCK_TICK_RATE' undeclared
    [WATCHDOG] rc32434_wdt: fix sections
    [WATCHDOG] rc32434_wdt: fix watchdog driver

    Linus Torvalds