14 Oct, 2010

1 commit

  • Define dummy __stop_machine() function even when
    CONFIG_STOP_MACHINE=n. This getcpu-required version of
    stop_machine() will be used from poke_text_smp().

    Signed-off-by: Masami Hiramatsu
    Acked-by: Tejun Heo
    Cc: Rusty Russell
    Cc: Ananth N Mavinakayanahalli
    Cc: 2nddept-manager@sdl.hitachi.co.jp
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     

08 Oct, 2010

1 commit


06 Oct, 2010

3 commits

  • …/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
     
  • 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
     

02 Oct, 2010

3 commits

  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    vmwgfx: Fix fb VRAM pinning failure due to fragmentation
    vmwgfx: Remove initialisation of dev::devname
    vmwgfx: Enable use of the vblank system
    vmwgfx: vt-switch (master drop) fixes
    drm/vmwgfx: Fix breakage introduced by commit "drm: block userspace under allocating buffer and having drivers overwrite it (v2)"
    drm: Hold the mutex when dropping the last GEM reference (v2)
    drm/gem: handlecount isn't really a kref so don't make it one.
    drm: i810/i830: fix locked ioctl variant
    drm/radeon/kms: add quirk for MSI K9A2GM motherboard
    drm/radeon/kms: fix potential segfault in r600_ioctl_wait_idle
    drm: Prune GEM vma entries
    drm/radeon/kms: fix up encoder info messages for DFP6
    drm/radeon: fix PCI ID 5657 to be an RV410

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI: invoke DSDT corruption workaround on all Toshiba Satellite
    ACPI, APEI, Fix ERST MOVE_DATA instruction implementation
    ACPI: fan: Fix more unbalanced code block
    ACPI: acpi_pad: simplify code to avoid false gcc build warning
    ACPI, APEI, Fix error path for memory allocation
    ACPI, APEI, HEST Fix the unsuitable usage of platform_data
    ACPI, APEI, Fix acpi_pre_map() return value
    ACPI, APEI, Fix APEI related table size checking
    ACPI: Disable Windows Vista compatibility for Toshiba P305D
    ACPI: Kconfig: fix typo.
    ACPI: add missing __percpu markup in arch/x86/kernel/acpi/cstate.c
    ACPI: Fix typos
    ACPI video: fix a poor warning message
    ACPI: fix build warnings resulting from merge window conflict
    ACPI: EC: add Vista incompatibility DMI entry for Toshiba Satellite L355
    ACPI: expand Vista blacklist to include SP1 and SP2
    ACPI: delete ZEPTO idle=nomwait DMI quirk
    ACPI: enable repeated PCIEXP wakeup by clearing PCIEXP_WAKE_STS on resume
    PM / ACPI: Blacklist systems known to require acpi_sleep=nonvs
    ACPI: Don't report current_now if battery reports in mWh

    Linus Torvalds
     
  • * 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
    intel_idle: Voluntary leave_mm before entering deeper
    acpi_idle: add missing \n to printk
    intel_idle: add missing __percpu markup
    intel_idle: Change mode 755 => 644
    cpuidle: Fix typos
    intel_idle: PCI quirk to prevent Lenovo Ideapad s10-3 boot hang

    Linus Torvalds
     

01 Oct, 2010

3 commits

  • In order to be fully threadsafe we need to check that the drm_gem_object
    refcount is still 0 after acquiring the mutex in order to call the free
    function. Otherwise, we may encounter scenarios like:

    Thread A: Thread B:
    drm_gem_close
    unreference_unlocked
    kref_put mutex_lock
    ... i915_gem_evict
    ... kref_get -> BUG
    ... i915_gem_unbind
    ... kref_put
    ... i915_gem_object_free
    ... mutex_unlock
    mutex_lock
    i915_gem_object_free -> BUG
    i915_gem_object_unbind
    kfree
    mutex_unlock

    Note that no driver is currently using the free_unlocked vfunc and it is
    scheduled for removal, hasten that process.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30454
    Reported-and-Tested-by: Magnus Kessler
    Signed-off-by: Chris Wilson
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Chris Wilson
     
  • Avoid TLB flush IPIs for the cores in deeper c-states by voluntary leave_mm()
    before entering into that state. CPUs tend to flush TLB in those c-states
    anyways.

    acpi_idle does this with C3-type states, but it was not caried over
    when intel_idle was introduced. intel_idle can apply it
    to C-states in addition to those that ACPI might export as C3...

    Signed-off-by: Suresh Siddha
    Signed-off-by: Len Brown

    Suresh Siddha
     
  • There were lots of places being inconsistent since handle count
    looked like a kref but it really wasn't.

    Fix this my just making handle count an atomic on the object,
    and have it increase the normal object kref.

    Now i915/radeon/nouveau drivers can drop the normal reference on
    userspace object creation, and have the handle hold it.

    This patch fixes a memory leak or corruption on unload, because
    the driver had no way of knowing if a handle had been actually
    added for this object, and the fbcon object needed to know this
    to clean itself up properly.

    Reviewed-by: Chris Wilson
    Signed-off-by: Dave Airlie

    Dave Airlie
     

30 Sep, 2010

1 commit


29 Sep, 2010

2 commits

  • Signed-off-by: Len Brown

    Lucas De Marchi
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
    tcp: Fix >4GB writes on 64-bit.
    net/9p: Mount only matching virtio channels
    de2104x: fix ethtool
    tproxy: check for transparent flag in ip_route_newports
    ipv6: add IPv6 to neighbour table overflow warning
    tcp: fix TSO FACK loss marking in tcp_mark_head_lost
    3c59x: fix regression from patch "Add ethtool WOL support"
    ipv6: add a missing unregister_pernet_subsys call
    s390: use free_netdev(netdev) instead of kfree()
    sgiseeq: use free_netdev(netdev) instead of kfree()
    rionet: use free_netdev(netdev) instead of kfree()
    ibm_newemac: use free_netdev(netdev) instead of kfree()
    smsc911x: Add MODULE_ALIAS()
    net: reset skb queue mapping when rx'ing over tunnel
    br2684: fix scheduling while atomic
    de2104x: fix TP link detection
    de2104x: fix power management
    de2104x: disable autonegotiation on broken hardware
    net: fix a lockdep splat
    e1000e: 82579 do not gate auto config of PHY by hardware during nominal use
    ...

    Linus Torvalds
     

28 Sep, 2010

4 commits

  • Fixes kernel bugzilla #16603

    tcp_sendmsg() truncates iov_len to an 'int' which a 4GB write to write
    zero bytes, for example.

    There is also the problem higher up of how verify_iovec() works. It
    wants to prevent the total length from looking like an error return
    value.

    However it does this using 'int', but syscalls return 'long' (and
    thus signed 64-bit on 64-bit machines). So it could trigger
    false-positives on 64-bit as written. So fix it to use 'long'.

    Reported-by: Olaf Bonorden
    Reported-by: Daniel Büse
    Reported-by: Andrew Morton
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Hook the GEM vm open/close ops into the generic drm vm open/close so
    that the private vma entries are created and destroy appropriately.
    Fixes the leak of the drm_vma_entries during the lifetime of the filp.

    Reported-by: Matt Mackall
    Cc: Jesse Barnes
    Signed-off-by: Chris Wilson
    Acked-by: Jesse Barnes
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Chris Wilson
     
  • as done in ip_route_connect()

    Signed-off-by: Ulrich Weber
    Signed-off-by: David S. Miller

    Ulrich Weber
     
  • …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/amd-iommu: Fix rounding-bug in __unmap_single
    x86/amd-iommu: Work around S3 BIOS bug
    x86/amd-iommu: Set iommu configuration flags in enable-loop
    x86, setup: Fix earlyprintk=serial,0x3f8,115200
    x86, setup: Fix earlyprintk=serial,ttyS0,115200

    Linus Torvalds
     

27 Sep, 2010

3 commits

  • Clean up a missing exit path in the ipv6 module init routines. In
    addrconf_init we call ipv6_addr_label_init which calls register_pernet_subsys
    for the ipv6_addr_label_ops structure. But if module loading fails, or if the
    ipv6 module is removed, there is no corresponding unregister_pernet_subsys call,
    which leaves a now-bogus address on the pernet_list, leading to oopses in
    subsequent registrations. This patch cleans up both the failed load path and
    the unload path. Tested by myself with good results.

    Signed-off-by: Neil Horman

    include/net/addrconf.h | 1 +
    net/ipv6/addrconf.c | 11 ++++++++---
    net/ipv6/addrlabel.c | 5 +++++
    3 files changed, 14 insertions(+), 3 deletions(-)
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Reset queue mapping when an skb is reentering the stack via a tunnel.
    On second pass, the queue mapping from the original device is no
    longer valid.

    Signed-off-by: Tom Herbert
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • fixes https://bugzilla.kernel.org/show_bug.cgi?id=19012

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

    Dave Airlie
     

24 Sep, 2010

2 commits


23 Sep, 2010

10 commits

  • rcu_dereference_bh() doesnt know yet about hard irq being disabled, so
    lockdep can trigger in netpoll_rx() after commit f0f9deae9e7c4 (netpoll:
    Disable IRQ around RCU dereference in netpoll_rx)

    Reported-by: Miles Lane
    Signed-off-by: Eric Dumazet
    Tested-by: Miles Lane
    Signed-off-by: Paul E. McKenney

    Eric Dumazet
     
  • This patch adds a workaround for an IOMMU BIOS problem to
    the AMD IOMMU driver. The result of the bug is that the
    IOMMU does not execute commands anymore when the system
    comes out of the S3 state resulting in system failure. The
    bug in the BIOS is that is does not restore certain hardware
    specific registers correctly. This workaround reads out the
    contents of these registers at boot time and restores them
    on resume from S3. The workaround is limited to the specific
    IOMMU chipset where this problem occurs.

    Cc: stable@kernel.org
    Signed-off-by: Joerg Roedel

    Joerg Roedel
     
  • This fixes the regression caused by the commit 6fee48cd330c68
    ("dma-mapping: arm: use generic pci_set_dma_mask and
    pci_set_consistent_dma_mask").

    ARM needs to clip the dma coherent mask for dmabounce devices. This
    restores the old trick.

    Note that strictly speaking, the DMA API doesn't allow architectures to do
    such but I'm not sure it's worth adding the new API to set the dma mask
    that allows architectures to clip it.

    Reported-by: Krzysztof Halasa
    Signed-off-by: FUJITA Tomonori
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • Add a missing inline keyword for static function in linux/dmaengine.h to
    avoid duplicate symbol definitions.

    Signed-off-by: Mathieu Lacage
    Signed-off-by: Dan Williams

    Mathieu Lacage
     
  • Convert the 'dynamic debug' infrastructure to use jump labels.

    Signed-off-by: Jason Baron
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Jason Baron
     
  • Make use of the jump label infrastructure for tracepoints.

    Signed-off-by: Jason Baron
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Jason Baron
     
  • Add a jump_label_text_reserved(void *start, void *end), so that other
    pieces of code that want to modify kernel text, can first verify that
    jump label has not reserved the instruction.

    Acked-by: Masami Hiramatsu
    Signed-off-by: Jason Baron
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Jason Baron
     
  • base patch to implement 'jump labeling'. Based on a new 'asm goto' inline
    assembly gcc mechanism, we can now branch to labels from an 'asm goto'
    statment. This allows us to create a 'no-op' fastpath, which can subsequently
    be patched with a jump to the slowpath code. This is useful for code which
    might be rarely used, but which we'd like to be able to call, if needed.
    Tracepoints are the current usecase that these are being implemented for.

    Acked-by: David S. Miller
    Signed-off-by: Jason Baron
    LKML-Reference:

    [ cleaned up some formating ]

    Signed-off-by: Steven Rostedt

    Jason Baron
     
  • This patch reduces namespace pollution by moving the "struct net" declaration
    out of the userspace-facing portion of linux/netlink.h. It has no impact on
    the kernel.

    (This came up because we have several C++ applications which use "net" as a
    namespace name.)

    Signed-off-by: Ollie Wild
    Signed-off-by: David S. Miller

    Ollie Wild
     
  • Conflicts:
    kernel/hw_breakpoint.c

    Merge reason: resolve the conflict.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

22 Sep, 2010

1 commit

  • The lock structs are currently protected by the BKL, but are accessed by
    code in fs/locks.c and misc file system and DLM code. These stubs will
    allow all users to switch to the new interface before the implementation
    is changed to a spinlock.

    Acked-by: Arnd Bergmann
    Signed-off-by: Sage Weil
    Signed-off-by: Linus Torvalds

    Sage Weil
     

21 Sep, 2010

3 commits

  • These are similar to {get,put}_cpu_var() except for dynamically
    allocated per-cpu memory.

    Signed-off-by: Peter Zijlstra
    Acked-by: Tejun Heo
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Merge reason: Pick up the latest fixes in -rc5.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • The family parameter xfrm_state_find is used to find a state matching a
    certain policy. This value is set to the template's family
    (encap_family) right before xfrm_state_find is called.
    The family parameter is however also used to construct a temporary state
    in xfrm_state_find itself which is wrong for inter-family scenarios
    because it produces a selector for the wrong family. Since this selector
    is included in the xfrm_user_acquire structure, user space programs
    misinterpret IPv6 addresses as IPv4 and vice versa.
    This patch splits up the original init_tempsel function into a part that
    initializes the selector respectively the props and id of the temporary
    state, to allow for differing ip address families whithin the state.

    Signed-off-by: Thomas Egerer
    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Thomas Egerer
     

20 Sep, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
    dca: disable dca on IOAT ver.3.0 multiple-IOH platforms
    netpoll: Disable IRQ around RCU dereference in netpoll_rx
    sctp: Do not reset the packet during sctp_packet_config().
    net/llc: storing negative error codes in unsigned short
    MAINTAINERS: move atlx discussions to netdev
    drivers/net/cxgb3/cxgb3_main.c: prevent reading uninitialized stack memory
    drivers/net/eql.c: prevent reading uninitialized stack memory
    drivers/net/usb/hso.c: prevent reading uninitialized memory
    xfrm: dont assume rcu_read_lock in xfrm_output_one()
    r8169: Handle rxfifo errors on 8168 chips
    3c59x: Remove atomic context inside vortex_{set|get}_wol
    tcp: Prevent overzealous packetization by SWS logic.
    net: RPS needs to depend upon USE_GENERIC_SMP_HELPERS
    phylib: fix PAL state machine restart on resume
    net: use rcu_barrier() in rollback_registered_many
    bonding: correctly process non-linear skbs
    ipv4: enable getsockopt() for IP_NODEFRAG
    ipv4: force_igmp_version ignored when a IGMPv3 query received
    ppp: potential NULL dereference in ppp_mp_explode()
    net/llc: make opt unsigned in llc_ui_setsockopt()
    ...

    Linus Torvalds
     

18 Sep, 2010

1 commit

  • We cannot use rcu_dereference_bh safely in netpoll_rx as we may
    be called with IRQs disabled. We could however simply disable
    IRQs as that too causes BH to be disabled and is safe in either
    case.

    Thanks to John Linville for discovering this bug and providing
    a patch.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

17 Sep, 2010

1 commit

  • Revert the timer per cpu-context timers because of unfortunate
    nohz interaction. Fixing that would have been somewhat ugly, so
    go back to driving things from the regular tick. Provide a
    jiffies interval feature for people who want slower rotations.

    Signed-off-by: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Robert Richter
    Cc: Yinghai Lu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra