26 Jun, 2013

5 commits

  • Wound/wait mutexes are used when other multiple lock
    acquisitions of a similar type can be done in an arbitrary
    order. The deadlock handling used here is called wait/wound in
    the RDBMS literature: The older tasks waits until it can acquire
    the contended lock. The younger tasks needs to back off and drop
    all the locks it is currently holding, i.e. the younger task is
    wounded.

    For full documentation please read Documentation/ww-mutex-design.txt.

    References: https://lwn.net/Articles/548909/
    Signed-off-by: Maarten Lankhorst
    Acked-by: Daniel Vetter
    Acked-by: Rob Clark
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/51C8038C.9000106@canonical.com
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • This will allow me to call functions that have multiple
    arguments if fastpath fails. This is required to support ticket
    mutexes, because they need to be able to pass an extra argument
    to the fail function.

    Originally I duplicated the functions, by adding
    __mutex_fastpath_lock_retval_arg. This ended up being just a
    duplication of the existing function, so a way to test if
    fastpath was called ended up being better.

    This also cleaned up the reservation mutex patch some by being
    able to call an atomic_set instead of atomic_xchg, and making it
    easier to detect if the wrong unlock function was previously
    used.

    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: robclark@gmail.com
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113105.4001.83929.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • Pull s390 fixes from Martin Schwidefsky:
    "A couple of last-minute fixes: a build regression for !SMP, a recent
    memory detection patch caused kdump to break, a regression in regard
    to sscanf vs reboot from FCP, and two fixes in the DMA mapping code
    for PCI"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/ipl: Fix FCP WWPN and LUN format strings for read
    s390/mem_detect: fix memory hole handling
    s390/dma: support debug_dma_mapping_error
    s390/dma: fix mapping_error detection
    s390/irq: Only define synchronize_irq() on SMP

    Linus Torvalds
     
  • Pull powerpc bugfix from Ben Herrenschmidt:
    "This is a fix for a regression causing a freescale "83xx" based
    platforms to crash on boot due to some PCI breakage"

    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc/pci: Fix boot panic on mpc83xx (regression)

    Linus Torvalds
     
  • Pull fuse bugfix from Miklos Szeredi:
    "This fixes a race between fallocate() and truncate()"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
    fuse: hold i_mutex in fuse_file_fallocate()

    Linus Torvalds
     

25 Jun, 2013

2 commits

  • Pull spi updates from Mark Brown:
    "A few last minute SPI updates: fix a missized allocation and use
    atomic allocations in atomic context in the PXA driver, and fix the
    checking of return codes in the S3C64xx driver which caused spurious
    errors under heavy load."

    * tag 'spi-v3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
    spi/pxa2xx: fix memory corruption due to wrong size used in devm_kzalloc()
    spi/pxa2xx: use GFP_ATOMIC in sg table allocation
    spi: s3c64xx: Fix pm_runtime_get_sync() return value check

    Linus Torvalds
     
  • The following commit caused a fatal oops when booting on mpc83xx with
    a non-express PCI bus (regardless of whether a PCI device is present):

    commit 50d8f87d2b39313dae9d0a2d9b23d377328f2f7b
    Author: Rojhalat Ibrahim
    Date: Mon Apr 8 10:15:28 2013 +0200

    powerpc/fsl-pci Make PCIe hotplug work with Freescale PCIe controllers

    Up to now the PCIe link status on Freescale PCIe controllers was only
    checked once at boot time. So hotplug did not work. With this patch the
    link status is checked on every config read. PCIe devices not present at
    boot time are found after doing 'echo 1 >/sys/bus/pci/rescan'.

    Signed-off-by: Rojhalat Ibrahim
    Signed-off-by: Kumar Gala

    This patch fixes the issue by calling setup_indirect_pci for all device types.
    fsl_indirect_read_config is now only used for booke/86xx PCIe controllers.

    Reported-by: Michael Guntsche
    Cc: Scott Wood
    Signed-off-by: Rojhalat Ibrahim
    Signed-off-by: Scott Wood

    Rojhalat Ibrahim
     

24 Jun, 2013

5 commits


23 Jun, 2013

8 commits

  • Linus Torvalds
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "These are two fixes that came in this week, one for a regression we
    introduced in 3.10 in the GIC interrupt code, and the other one fixes
    a typo in newly introduced code"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case
    ARM: dts: Correct the base address of pinctrl_3 on Exynos5250

    Linus Torvalds
     
  • Pull driver core fix from Greg Kroah-Hartman:
    "Here's a single patch for the firmware core that resolves a reported
    oops in the firmware core that people have been hitting."

    * tag 'driver-core-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    firmware loader: fix use-after-free by double abort

    Linus Torvalds
     
  • Pull USB fixes from Greg Kroah-Hartman:
    "Here are two USB patches for 3.10.

    One updates the Kconfig wording for CONFIG_USB_PHY to make it,
    hopefully, more obvious what this option is (I know you complained
    about this when it hit the tree.) The other is a new device id for a
    driver"

    * tag 'usb-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable
    usb: phy: Improve Kconfig help for CONFIG_USB_PHY

    Linus Torvalds
     
  • Pul tty fixes from Greg Kroah-Hartman:
    "Here are two tty core fixes that resolve some regressions that have
    been reported recently. Both tiny fixes, but needed"

    * tag 'tty-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    tty: Fix transient pty write() EIO
    tty/vt: Return EBUSY if deallocating VT1 and it is busy

    Linus Torvalds
     
  • Pull SCSI target fixes from Nicholas Bellinger:
    "Included is the recent tcm_qla2xxx residual underrun length fix from
    Roland, along with Joern's iscsi-target patch for session_lock
    breakage within iscsit_stop_time2retain_timer() code. Both are CC'ed
    to stable.

    The remaining two are specific to recent iscsi-target + iser
    conversion changes. One drops some left-over debug noise, and Andy's
    patch fixes configfs attribute handling during an explicit network
    portal feature bit disable when iser-target is unsupported."

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    iscsi-target: Remove left over v3.10-rc debug printks
    target/iscsi: Fix op=disable + error handling cases in np_store_iser
    tcm_qla2xxx: Fix residual for underrun commands that fail
    target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer()

    Linus Torvalds
     
  • Pull media fixes from Mauro Carvalho Chehab:
    "Another set of fixes for Kernel 3.10.

    This series contain:
    - two Kbuild fixes for randconfig
    - a buffer overflow when using rtl28xuu with r820t tuner
    - one clk fixup on exynos4-is driver"

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] Fix build when drivers are builtin and frontend modules
    [media] s5p makefiles: don't override other selections on obj-[ym]
    [media] exynos4-is: Fix FIMC-IS clocks initialization
    [media] rtl28xxu: fix buffer overflow when probing Rafael Micro r820t tuner

    Linus Torvalds
     
  • Pull vfs fixes from Al Viro:
    "Several fixes for bugs caught while looking through f_pos (ab)users"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    aout32 coredump compat fix
    splice: don't pass the address of ->f_pos to methods
    mconsole: we'd better initialize pos before passing it to vfs_read()...

    Linus Torvalds
     

22 Jun, 2013

7 commits

  • dump_seek() does SEEK_CUR, not SEEK_SET; native binfmt_aout
    handles it correctly (seeks by PAGE_SIZE - sizeof(struct user),
    getting the current position to PAGE_SIZE), compat one seeks
    by PAGE_SIZE and ends up at PAGE_SIZE + already written...

    Signed-off-by: Al Viro

    Al Viro
     
  • Pull x86 fixes from Peter Anvin:
    "This series fixes a couple of build failures, and fixes MTRR cleanup
    and memory setup on very specific memory maps.

    Finally, it fixes triggering backtraces on all CPUs, which was
    inadvertently disabled on x86."

    * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/efi: Fix dummy variable buffer allocation
    x86: Fix trigger_all_cpu_backtrace() implementation
    x86: Fix section mismatch on load_ucode_ap
    x86: fix build error and kconfig for ia32_emulation and binfmt
    range: Do not add new blank slot with add_range_with_merge
    x86, mtrr: Fix original mtrr range get for mtrr_cleanup

    Linus Torvalds
     
  • Pull drm radeon fixes from Dave Airlie:
    "One core fix, but mostly radeon fixes for s/r and big endian UVD
    support, and a fix to stop the GPU being reset for no good reason, and
    crashing people's machines."

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon: update lockup tracking when scheduling in empty ring
    drm/prime: Honor requested file flags when exporting a buffer
    drm/radeon: fix UVD on big endian
    drm/radeon: fix write back suspend regression with uvd v2
    drm/radeon: do not try to uselessly update virtual memory pagetable

    Linus Torvalds
     
  • Pull ACPI fixes from Rafael Wysocki:

    - Fix for a regression causing a failure to turn on some devices on
    some systems during initialization introduced by a recent revert of
    an ACPI PM change that broke something else. Fortunately, we know
    exactly what devices are affected, so we can add a fix just for them
    leaving everyone else alone.

    - ACPI power resources initialization fix preventing a NULL pointer
    from being dereferenced in the acpi_add_power_resource() error code
    path.

    - ACPI dock station driver fix that adds missing locking to
    write_undock().

    - ACPI resources allocation fix changing the scope of an old workaround
    so that it doesn't affect systems that aren't actually buggy. This
    was reported a couple of days ago to fix DMA problems on some new
    platforms so we need it in -stable. From Mika Westerberg.

    * tag 'acpi-3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / LPSS: Power up LPSS devices during enumeration
    ACPI / PM: Fix error code path for power resources initialization
    ACPI / dock: Take ACPI scan lock in write_undock()
    ACPI / resources: call acpi_get_override_irq() only for legacy IRQ resources

    Linus Torvalds
     
  • Pull KVM fixes from Paolo Bonzini:
    "Three one-line fixes for my first pull request; one for x86 host, one
    for x86 guest, one for PPC"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    x86: kvmclock: zero initialize pvclock shared memory area
    kvm/ppc/booke: Delay kvmppc_lazy_ee_enable
    KVM: x86: remove vcpu's CPL check in host-invoked XCR set

    Linus Torvalds
     
  • Pull crypto fix from Herbert Xu:
    "This fixes an unaligned crash in XTS mode when using aseni_intel"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: aesni_intel - fix accessing of unaligned memory

    Linus Torvalds
     
  • Pull Ceph fix from Sage Weil:
    "This fixes a problem preventing the kernel and userland librbd
    libraries from sharing data with the new format 2 images"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    rbd: use the correct length for format 2 object names

    Linus Torvalds
     

21 Jun, 2013

13 commits

  • * Don't leak random kernel memory to EFI variable NVRAM when attempting
    to initiate garbage collection. Also, free the kernel memory when
    we're done with it instead of leaking - Ben Hutchings

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     
  • ACPI part of the driver accidentally used sizeof(*ssp) instead of the
    correct sizeof(*pdata). This leads to nasty memory corruptions like the one
    below:

    BUG: unable to handle kernel paging request at 0000000749fd30b8
    IP: [] __list_del_entry+0x31/0xd0
    PGD 0
    Oops: 0000 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 0 PID: 30 Comm: kworker/0:1 Not tainted 3.10.0-rc6v3.10-rc6_sdhci_modprobe+ #443
    task: ffff8801483a0940 ti: ffff88014839e000 task.ti: ffff88014839e000
    RIP: 0010:[] [] __list_del_entry+0x31/0xd0
    RSP: 0000:ffff88014839fde8 EFLAGS: 00010046
    RAX: ffff880149fd30b0 RBX: ffff880149fd3040 RCX: dead000000200200
    RDX: 0000000749fd30b0 RSI: ffff880149fd3058 RDI: ffff88014834d640
    RBP: ffff88014839fde8 R08: ffff88014834d640 R09: 0000000000000001
    R10: ffff8801483a0940 R11: 0000000000000001 R12: ffff880149fd3040
    R13: ffffffff810e0b30 R14: ffff8801483a0940 R15: ffff88014834d640
    FS: 0000000000000000(0000) GS:ffff880149e00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000168 CR3: 0000000001e0b000 CR4: 00000000001407f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Stack:
    ffff88014839fe48 ffffffff810e0baf ffffffff81120abd ffff88014839fe20
    ffff8801483a0940 ffff8801483a0940 ffff8801483a0940 ffff8801486b1c90
    ffff88014834d640 ffffffff810e0b30 0000000000000000 0000000000000000
    Call Trace:
    [] worker_thread+0x7f/0x390
    [] ? trace_hardirqs_on+0xd/0x10
    [] ? manage_workers.isra.22+0x2b0/0x2b0
    [] kthread+0xd9/0xe0
    [] ? local_clock+0x3f/0x50
    [] ? kthread_create_on_node+0x110/0x110
    [] ret_from_fork+0x7c/0xb0
    [] ? kthread_create_on_node+0x110/0x110

    Fix this by using the right structure size in devm_kzalloc().

    Reported-by: Jerome Blin
    Signed-off-by: Mika Westerberg
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org # 3.9+

    Mika Westerberg
     
  • 1. Check for allocation failure
    2. Clear the buffer contents, as they may actually be written to flash
    3. Don't leak the buffer

    Compile-tested only.

    [ Tested successfully on my buggy ASUS machine - Matt ]

    Signed-off-by: Ben Hutchings
    Cc: stable@vger.kernel.org
    Signed-off-by: Matt Fleming

    Ben Hutchings
     
  • Reported-by: Andy Grover
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • Writing 0 when iser was not previously enabled, so succeed but do
    nothing so that user-space code doesn't need a try: catch block
    when ib_isert logic is not available.

    Also, return actual error from add_network_portal using PTR_ERR
    during op=enable failure.

    Signed-off-by: Andy Grover
    Signed-off-by: Nicholas Bellinger

    Andy Grover
     
  • One user visible fix to stop misreport GPU hangs and subsequent resets.
    * 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux:
    drm/radeon: update lockup tracking when scheduling in empty ring

    Dave Airlie
     
  • There might be issue with lockup detection when scheduling on an
    empty ring that have been sitting idle for a while. Thus update
    the lockup tracking data when scheduling new work in an empty ring.

    Signed-off-by: Jerome Glisse
    Tested-by: Andy Lutomirski
    Cc: stable@vger.kernel.org
    Reviewed-by: Christian König
    Signed-off-by: Alex Deucher

    Jerome Glisse
     
  • Pull scheduler fixes from Ingo Molnar:
    "Two smaller fixes - plus a context tracking tracing fix that is a bit
    bigger"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    tracing/context-tracking: Add preempt_schedule_context() for tracing
    sched: Fix clear NOHZ_BALANCE_KICK
    sched/x86: Construct all sibling maps if smt

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Four fixes. The mmap ones are unfortunately larger than desired -
    fuzzing uncovered bugs that needed perf context life time management
    changes to fix properly"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86: Fix broken PEBS-LL support on SNB-EP/IVB-EP
    perf: Fix mmap() accounting hole
    perf: Fix perf mmap bugs
    kprobes: Fix to free gone and unused optprobes

    Linus Torvalds
     
  • Pull cpu idle fixes from Thomas Gleixner:
    - Add a missing irq enable. Fallout of the idle conversion
    - Fix stackprotector wreckage caused by the idle conversion

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    idle: Enable interrupts in the weak arch_cpu_idle() implementation
    idle: Add the stack canary init to cpu_startup_entry()

    Linus Torvalds
     
  • Pull timer fixes from Thomas Gleixner:
    - Fix inconstinant clock usage in virtual time accounting
    - Fix a build error in KVM caused by the NOHZ work
    - Remove a pointless timekeeping duty assignment which breaks NOHZ
    - Use a proper notifier return value to avoid random behaviour

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    tick: Remove useless timekeeping duty attribution to broadcast source
    nohz: Fix notifier return val that enforce timekeeping
    kvm: Move guest entry/exit APIs to context_tracking
    vtime: Use consistent clocks among nohz accounting

    Linus Torvalds
     
  • Pull powerpc fix fro, Benjamin Herrenschmidt:
    "We accidentally broke hugetlbfs on Freescale embedded processors which
    use a slightly different page table layout than our server processors"

    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc: Fix bad pmd error with book3E config

    Linus Torvalds
     
  • Pull tilepro fix from Chris Metcalf:
    "This change allows the older tilepro architecture to be correctly
    built by newer gccs, despite a change that caused gcc to start trying
    to use an out-of-line implementation for __builtin_ffsll().

    This should be inline again starting with gcc 4.7.4 and 4.8.2 or so,
    but meanwhile this change keeps things from breaking, with the only
    cost being a few bytes of code in the kernel to provide __ffsdi2 even
    for compilers that do inline it"

    * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    tilepro: work around module link error with gcc 4.7

    Linus Torvalds