21 Jul, 2010

21 commits

  • Up to 2.6.34 pcmcia_release_irq() reset p_dev->_irq to 0 after releasing
    the irq. The IRQ is now released in pcmcia_disable_device(), however
    p_dev->_irq is not reset, triggering a warning in pcmcia_device_remove().

    Signed-off-by: Patrick McHardy
    Signed-off-by: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Patrick McHardy
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/r600: fix possible NULL pointer derefernce
    drm/radeon/kms: add quirk for ASUS HD 3600 board
    include/linux/vgaarb.h: add missing part of include guard
    drm/nouveau: Fix crashes during fbcon init on single head cards.
    drm/nouveau: fix pcirom vbios shadow breakage from acpi rom patch
    drm/radeon/kms: fix shared ddc harder
    drm/i915: enable low power render writes on GEN3 hardware.
    drm/i915: Define MI_ARB_STATE bits
    vmwgfx: return -EFAULT if copy_to_user fails
    fb: handle allocation failure in alloc_apertures()
    drm: radeon: check kzalloc() result
    drm/ttm: Fix build on architectures without AGP
    drm/radeon/kms: fix gtt MC base alignment on rs4xx/rs690/rs740 asics
    drm/radeon/kms: fix possible mis-detection of sideport on rs690/rs740
    drm/radeon/kms: fix legacy tv-out pal mode

    Linus Torvalds
     
  • Reported-by: Alexander Y. Fomichev
    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Connector is actually DVI rather than HDMI.

    Reported-by: trapDoor
    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • vgaarb.h was missing the #define of the #ifndef at the top for the guard
    to prevent multiple #include's from causing re-define errors

    Signed-off-by: Doug Goldstein
    Cc: Dave Airlie
    Cc: Jesse Barnes
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Airlie

    Doug Goldstein
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    ceph: do not include cap/dentry releases in replayed messages
    ceph: reuse request message when replaying against recovering mds
    ceph: fix creation of ipv6 sockets
    ceph: fix parsing of ipv6 addresses
    ceph: fix printing of ipv6 addrs
    ceph: add kfree() to error path
    ceph: fix leak of mon authorizer
    ceph: fix message revocation

    Linus Torvalds
     
  • * 'linuxdocs' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs:
    documentation: fix almost duplicate filenames (IO/io-mapping.txt)

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
    bridge: Partially disable netpoll support
    tcp: fix crash in tcp_xmit_retransmit_queue
    IPv6: fix CoA check in RH2 input handler (mip6_rthdr_input())
    ibmveth: lost IRQ while closing/opening device leads to service loss
    rt2x00: Fix lockdep warning in rt2x00lib_probe_dev()
    vhost: avoid pr_err on condition guest can trigger
    ipmr: Don't leak memory if fib lookup fails.
    vhost-net: avoid flush under lock
    net: fix problem in reading sock TX queue
    net/core: neighbour update Oops
    net: skb_tx_hash() fix relative to skb_orphan_try()
    rfs: call sock_rps_record_flow() in tcp_splice_read()
    xfrm: do not assume that template resolving always returns xfrms
    hostap_pci: set dev->base_addr during probe
    axnet_cs: use spin_lock_irqsave in ax_interrupt
    dsa: Fix Kconfig dependencies.
    act_nat: not all of the ICMP packets need an IP header payload
    r8169: incorrect identifier for a 8168dp
    Phonet: fix skb leak in pipe endpoint accept()
    Bluetooth: Update sec_level/auth_type for already existing connections
    ...

    Linus Torvalds
     
  • If a single-threaded process does a file-descriptor operation, and some
    other process accesses that same file descriptor via /proc, the current
    rcu_dereference_check_fdtable() can give a false-positive RCU-lockdep
    splat due to the reference count being increased by the /proc access after
    the reference-count check in fget_light() but before the check in
    rcu_dereference_check_fdtable().

    This commit prevents this false positive by checking for a single-threaded
    process. To avoid #include hell, this commit uses the wrapper for
    thread_group_empty(current) defined by rcu_my_thread_group_empty()
    provided in a separate commit.

    Located-by: Miles Lane
    Located-by: Eric Dumazet
    Signed-off-by: Paul E. McKenney
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • System will crash sooner or later once the memory with the code of the
    s3c-sdhci.ko module is reused for something else. I really have no idea
    how the lack of remove function went unnoticed into the mainline code.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Kyungmin Park
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marek Szyprowski
     
  • My Collabora address is no longer enabled - update the MODULE_AUTHOR
    fields of drivers to my current email address.

    Signed-off-by: Andres Salomon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • Borislav Petkov reported his 32bit numa system has problem:

    [ 0.000000] Reserving total of 4c00 pages for numa KVA remap
    [ 0.000000] kva_start_pfn ~ 32800 max_low_pfn ~ 375fe
    [ 0.000000] max_pfn = 238000
    [ 0.000000] 8202MB HIGHMEM available.
    [ 0.000000] 885MB LOWMEM available.
    [ 0.000000] mapped low ram: 0 - 375fe000
    [ 0.000000] low ram: 0 - 375fe000
    [ 0.000000] alloc (nid=8 100000 - 7ee00000) (1000000 - ffffffff) 1000 1000 => 34e7000
    [ 0.000000] alloc (nid=8 100000 - 7ee00000) (1000000 - ffffffff) 200 40 => 34c9d80
    [ 0.000000] alloc (nid=0 100000 - 7ee00000) (1000000 - ffffffffffffffff) 180 40 => 34e6140
    [ 0.000000] alloc (nid=1 80000000 - c7e60000) (1000000 - ffffffffffffffff) 240 40 => 80000000
    [ 0.000000] BUG: unable to handle kernel paging request at 40000000
    [ 0.000000] IP: [] __alloc_memory_core_early+0x147/0x1d6
    [ 0.000000] *pdpt = 0000000000000000 *pde = f000ff53f000ff00
    ...
    [ 0.000000] Call Trace:
    [ 0.000000] [] ? __alloc_bootmem_node+0x216/0x22f
    [ 0.000000] [] ? sparse_early_usemaps_alloc_node+0x5a/0x10b
    [ 0.000000] [] ? sparse_init+0x1dc/0x499
    [ 0.000000] [] ? paging_init+0x168/0x1df
    [ 0.000000] [] ? native_pagetable_setup_start+0xef/0x1bb

    looks like it allocates too much high address for bootmem.

    Try to cut limit with get_max_mapped()

    Reported-by: Borislav Petkov
    Tested-by: Conny Seidel
    Signed-off-by: Yinghai Lu
    Cc: [2.6.34.x]
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Johannes Weiner
    Cc: Lee Schermerhorn
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     
  • Commit e534c7c5f8d6 ("numa: x86_64: use generic percpu var
    numa_node_id() implementation") broke numa systems that don't have ram
    on node0 when MEMORY_HOTPLUG is enabled, because cpu_up() will call
    cpu_to_node() before per_cpu(numa_node) is setup for APs.

    When Node0 doesn't have RAM, on x86, cpus already round it to nearest
    node with RAM in x86_cpu_to_node_map. and per_cpu(numa_node) is not set
    up until in c_init for APs.

    When later cpu_up() calling cpu_to_node() will get 0 again, and make it
    online even there is no RAM on node0. so later all APs can not booted up,
    and later will have panic.

    [ 1.611101] On node 0 totalpages: 0
    .........
    [ 2.608558] On node 0 totalpages: 0
    [ 2.612065] Brought up 1 CPUs
    [ 2.615199] Total of 1 processors activated (3990.31 BogoMIPS).
    ...
    93.225341] calling loop_init+0x0/0x1a4 @ 1
    [ 93.229314] PERCPU: allocation failed, size=80 align=8, failed to populate
    [ 93.246539] Pid: 1, comm: swapper Tainted: G W 2.6.35-rc4-tip-yh-04371-gd64e6c4-dirty #354
    [ 93.264621] Call Trace:
    [ 93.266533] [] pcpu_alloc+0x83a/0x8e7
    [ 93.270710] [] __alloc_percpu+0x10/0x12
    [ 93.285849] [] alloc_disk_node+0x94/0x16d
    [ 93.291811] [] alloc_disk+0x11/0x13
    [ 93.306157] [] loop_alloc+0xa7/0x180
    [ 93.310538] [] loop_init+0x9b/0x1a4
    [ 93.324909] [] ? loop_init+0x0/0x1a4
    [ 93.329650] [] do_one_initcall+0x57/0x136
    [ 93.345197] [] kernel_init+0x184/0x20e
    [ 93.348146] [] kernel_thread_helper+0x4/0x10
    [ 93.365194] [] ? restore_args+0x0/0x30
    [ 93.369305] [] ? kernel_init+0x0/0x20e
    [ 93.386011] [] ? kernel_thread_helper+0x0/0x10
    [ 93.392047] loop: out of memory
    ...

    Try to assign per_cpu(numa_node) early

    [akpm@linux-foundation.org: tidy up code comment]
    Signed-off-by: Yinghai
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Tejun Heo
    Cc: Denys Vlasenko
    Acked-by: Lee Schermerhorn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     
  • Simply add a proper ID into the device table.

    Signed-off-by: Anton Vorontsov
    Cc: Doug Thompson
    Cc: Peter Tyser
    Cc: Dave Jiang
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Since commit 5753c082f66eca5be81f6bda85c1718c5eea6ada ("powerpc/85xx:
    Kconfig cleanup"), there is no MPC85xx Kconfig symbol anymore, so the
    driver became non-selectable.

    This patch fixes the issue by switching to PPC_85xx symbol.

    Signed-off-by: Anton Vorontsov
    Cc: Doug Thompson
    Cc: Peter Tyser
    Cc: Dave Jiang
    Cc: Kumar Gala
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • We need lock_page_nosync() here because we have no reference to the
    mapping when taking the page lock.

    Signed-off-by: Nick Piggin
    Reviewed-by: Johannes Weiner
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • The last change to improve the scalability moved the actual wake-up out of
    the section that is protected by spin_lock(sma->sem_perm.lock).

    This means that IN_WAKEUP can be in queue.status even when the spinlock is
    acquired by the current task. Thus the same loop that is performed when
    queue.status is read without the spinlock acquired must be performed when
    the spinlock is acquired.

    Thanks to kamezawa.hiroyu@jp.fujitsu.com for noticing lack of the memory
    barrier.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16255

    [akpm@linux-foundation.org: clean up kerneldoc, checkpatch warning and whitespace]
    Signed-off-by: Manfred Spraul
    Reported-by: Luca Tettamanti
    Tested-by: Luca Tettamanti
    Reported-by: Christoph Lameter
    Cc: Maciej Rutecki
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Manfred Spraul
     
  • this fixes a regression since the fbcon rework.

    Signed-off-by: Francisco Jerez
    Signed-off-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    Francisco Jerez
     
  • On nv50 it became impossible to attempt a PCI ROM shadow of the VBIOS,
    which will break some setups.

    This patch also removes the different ordering of shadow methods for
    pre-nv50 chipsets. The reason for the different ordering was paranoia,
    but it should hopefully be OK to try shadowing PRAMIN first.

    Signed-off-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    Ben Skeggs
     
  • This fixes a regression caused by b2ea4aa67bfd084834edd070e0a4a47857d6db59
    due to the way shared ddc with multiple digital connectors was handled.

    You generally have two cases where DDC lines are shared:
    - HDMI + VGA
    - HDMI + DVI-D

    HDMI + VGA is easy to deal with because you can check the EDID for the
    to see if the attached monitor is digital. A shared DDC line with two
    digital connectors is more complex. You can't use the hdmi bits in the
    EDID since they may not be there with DVIHDMI adapters. In this case
    all we can do is check the HPD pins to see which is connected as we have
    no way of knowing using the EDID.

    Reported-by: trapdoor6@gmail.com
    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Having both IO-mapping.txt and io-mapping.txt in Documentation/
    was confusing and/or bothersome to some people, so rename
    IO-mapping.txt to bus-virt-phys-mapping.txt. Also update
    Documentation/00-INDEX for both of these files.

    Signed-off-by: Randy Dunlap
    Cc: Kees Bakker
    Cc: Keith Packard

    Randy Dunlap
     

20 Jul, 2010

19 commits

  • * git://git.infradead.org/users/cbou/battery-2.6.35:
    ds2782_battery: Fix ds2782_get_capacity return value

    Linus Torvalds
     
  • The new netpoll code in bridging contains use-after-free bugs
    that are non-trivial to fix.

    This patch fixes this by removing the code that uses skbs after
    they're freed.

    As a consequence, this means that we can no longer call bridge
    from the netpoll path, so this patch also removes the controller
    function in order to disable netpoll.

    Signed-off-by: Herbert Xu

    Thanks,
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • A lot of 945GMs have had stability issues for a long time, this manifested as X hangs, blitter engine hangs, and lots of crashes.

    one such report is at:
    https://bugs.freedesktop.org/show_bug.cgi?id=20560

    along with numerous distro bugzillas.

    This only took a week of digging and hair ripping to figure out.

    Tracked down and tested on a 945GM Lenovo T60,
    previously running
    x11perf -copypixwin500
    or
    x11perf -copywinpix500
    repeatedly would cause the GPU to wedge within 4 or 5 tries, with random busy bits set.

    After this patch no hangs were observed.

    cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • The i915 memory arbiter has a register full of configuration
    bits which are currently not defined in the driver header file.

    Signed-off-by: Keith Packard
    cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Keith Packard
     
  • copy_to_user() returns the number of bytes remaining to be copied, but
    we want to return a negative error code. This gets copied to user
    space.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Dave Airlie

    Dan Carpenter
     
  • If the kzalloc() fails we should return NULL. All the places that call
    alloc_apertures() check for this already.

    Signed-off-by: Dan Carpenter
    Acked-by: James Simmons
    Acked-by: Marcin Slusarz
    Signed-off-by: Dave Airlie

    Dan Carpenter
     
  • If kzalloc() fails exit with -ENOMEM.

    Signed-off-by: Kulikov Vasiliy
    Signed-off-by: Dave Airlie

    Kulikov Vasiliy
     
  • Make inclusion of conditional on TTM_HAS_AGP. The use
    of the functions declared in it is already conditional.

    Reported-by: Geert Stappers
    Signed-off-by: Ben Hutchings
    Tested-by: Geert Stappers
    Signed-off-by: Dave Airlie

    Ben Hutchings
     
  • * 'shrinker' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/xfsdev:
    xfs: track AGs with reclaimable inodes in per-ag radix tree
    xfs: convert inode shrinker to per-filesystem contexts
    mm: add context argument to shrinker callback

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
    Btrfs: fix checks in BTRFS_IOC_CLONE_RANGE
    Btrfs: fix CLONE ioctl destination file size expansion to block boundary
    Btrfs: fix split_leaf double split corner case

    Linus Torvalds
     
  • https://bugzilla.kernel.org/show_bug.cgi?id=16348

    When the filesystem grows to a large number of allocation groups,
    the summing of recalimable inodes gets expensive. In many cases,
    most AGs won't have any reclaimable inodes and so we are wasting CPU
    time aggregating over these AGs. This is particularly important for
    the inode shrinker that gets called frequently under memory
    pressure.

    To avoid the overhead, track AGs with reclaimable inodes in the
    per-ag radix tree so that we can find all the AGs with reclaimable
    inodes via a simple gang tag lookup. This involves setting the tag
    when the first reclaimable inode is tracked in the AG, and removing
    the tag when the last reclaimable inode is removed from the tree.
    Then the summation process becomes a loop walking the radix tree
    summing AGs with the reclaim tag set.

    This significantly reduces the overhead of scanning - a 6400 AG
    filesystea now only uses about 25% of a cpu in kswapd while slab
    reclaim progresses instead of being permanently stuck at 100% CPU
    and making little progress. Clean filesystems filesystems will see
    no overhead and the overhead only increases linearly with the number
    of dirty AGs.

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig

    Dave Chinner
     
  • Now the shrinker passes us a context, wire up a shrinker context per
    filesystem. This allows us to remove the global mount list and the
    locking problems that introduced. It also means that a shrinker call
    does not need to traverse clean filesystems before finding a
    filesystem with reclaimable inodes. This significantly reduces
    scanning overhead when lots of filesystems are present.

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig

    Dave Chinner
     
  • 1. The BTRFS_IOC_CLONE and BTRFS_IOC_CLONE_RANGE ioctls should check
    whether the donor file is append-only before writing to it.

    2. The BTRFS_IOC_CLONE_RANGE ioctl appears to have an integer
    overflow that allows a user to specify an out-of-bounds range to copy
    from the source file (if off + len wraps around). I haven't been able
    to successfully exploit this, but I'd imagine that a clever attacker
    could use this to read things he shouldn't. Even if it's not
    exploitable, it couldn't hurt to be safe.

    Signed-off-by: Dan Rosenberg
    cc: stable@kernel.org
    Signed-off-by: Chris Mason

    Dan Rosenberg
     
  • …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, pci, mrst: Add extra sanity check in walking the PCI extended cap chain
    x86: Fix x2apic preenabled system with kexec
    x86: Force HPET readback_cmp for all ATI chipsets

    Linus Torvalds
     
  • * 'kmemleak' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-2.6-cm:
    kmemleak: Add support for NO_BOOTMEM configurations
    kmemleak: Annotate false positive in init_section_page_cgroup()

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] cio: fix potential overflow in chpid descriptor
    [S390] add missing device put
    [S390] dasd: use correct label location for diag fba disks

    Linus Torvalds
     
  • - fix reversing of command/sub arguments
    - fix a crash if the i2c interface is called before the device is found

    Signed-off-by: Sreedhara DS
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sreedhara DS
     
  • The CLONE and CLONE_RANGE ioctls round up the range of extents being
    cloned to the block size when the range to clone extends to the end of file
    (this is always the case with CLONE). It was then using that offset when
    extending the destination file's i_size. Fix this by not setting i_size
    beyond the originally requested ending offset.

    This bug was introduced by a22285a6 (2.6.35-rc1).

    Signed-off-by: Sage Weil
    Signed-off-by: Chris Mason

    Sage Weil
     
  • split_leaf was not properly balancing leaves when it was forced to
    split a leaf twice. This commit adds an extra push left and right
    before forcing the double split in hopes of getting the slot where
    we want to insert at either the start or end of the leaf.

    If the extra pushes do work, then we are able to avoid splitting twice
    and we keep the tree properly balanced.

    Signed-off-by: Chris Mason

    Chris Mason