03 Jun, 2014

6 commits

  • …/linux into ti-linux-3.15.y

    * 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux:
    libata: Blacklist queued trim for Crucial M500
    md: always set MD_RECOVERY_INTR when interrupting a reshape thread.
    xhci: delete endpoints from bandwidth list before freeing whole device
    staging: r8192e_pci: fix htons error
    usb: pci-quirks: Prevent Sony VAIO t-series from switching usb ports
    md: always set MD_RECOVERY_INTR when aborting a reshape or other "resync".
    USB: cdc-wdm: properly include types.h
    usb: cdc-wdm: export cdc-wdm uapi header
    USB: serial: option: add support for Novatel E371 PCIe card
    USB: ftdi_sio: add NovaTech OrionLXm product ID
    USB: io_ti: fix firmware download on big-endian machines (part 2)
    USB: Avoid runtime suspend loops for HCDs that can't handle suspend/resume
    Staging: speakup: Update __speakup_paste_selection() tty (ab)usage to match vt
    Staging: speakup: Move pasting into a work item
    staging: comedi: ni_daq_700: add mux settling delay
    speakup: fix incorrect perms on speakup_acntsa.c
    x86, vdso: Fix an OOPS accessing the HPET mapping w/o an HPET

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • Pull two md bugfixes from Neil Brown:
    "Two md bugfixes for possible corruption when restarting reshape

    If a raid5/6 reshape is restarted (After stopping and re-assembling
    the array) and the array is marked read-only (or read-auto), then the
    reshape will appear to complete immediately, without actually moving
    anything around. This can result in corruption.

    There are two patches which do much the same thing in different
    places. They are separate because one is an older bug and so can be
    applied to more -stable kernels"

    * tag 'md/3.15-fixes' of git://neil.brown.name/md:
    md: always set MD_RECOVERY_INTR when interrupting a reshape thread.
    md: always set MD_RECOVERY_INTR when aborting a reshape or other "resync".

    Linus Torvalds
     
  • Queued trim only works for some users with MU05 firmware. Revert to
    blacklisting all firmware versions.

    Introduced by commit d121f7d0cbb8 ("libata: Update queued trim blacklist
    for M5x0 drives") which this effectively reverts, while retaining the
    blacklisting of M550.

    See

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

    for reports of trouble with MU05 firmware.

    Signed-off-by: Martin K. Petersen
    Cc: Alan Cox
    Cc: Tejun Heo
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Martin K. Petersen
     
  • Pull x86 fix from Peter Anvin:
    "A single quite small patch that managed to get overlooked earlier, to
    prevent a user space triggerable oops on systems without HPET"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, vdso: Fix an OOPS accessing the HPET mapping w/o an HPET

    Linus Torvalds
     
  • Pull USB fixes from Greg KH:
    "Here are some fixes for 3.15-rc8 that resolve a number of tiny USB
    issues that have been reported, and there are some new device ids as
    well.

    All have been tested in linux-next"

    * tag 'usb-3.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    xhci: delete endpoints from bandwidth list before freeing whole device
    usb: pci-quirks: Prevent Sony VAIO t-series from switching usb ports
    USB: cdc-wdm: properly include types.h
    usb: cdc-wdm: export cdc-wdm uapi header
    USB: serial: option: add support for Novatel E371 PCIe card
    USB: ftdi_sio: add NovaTech OrionLXm product ID
    USB: io_ti: fix firmware download on big-endian machines (part 2)
    USB: Avoid runtime suspend loops for HCDs that can't handle suspend/resume

    Linus Torvalds
     
  • Pull staging driver fixes from Greg KH:
    "Here are some staging driver fixes for 3.15.

    Three are for the speakup drivers (one fixes a regression caused in
    3.15-rc, and the other two resolve a tty issue found by Ben Hutchings)
    The comedi and r8192e_pci driver fixes also resolve reported issues"

    * tag 'staging-3.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: r8192e_pci: fix htons error
    Staging: speakup: Update __speakup_paste_selection() tty (ab)usage to match vt
    Staging: speakup: Move pasting into a work item
    staging: comedi: ni_daq_700: add mux settling delay
    speakup: fix incorrect perms on speakup_acntsa.c

    Linus Torvalds
     

02 Jun, 2014

6 commits

  • …/linux into ti-linux-3.15.y

    * 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux:
    Linux 3.15-rc8
    powerpc: Wire renameat2() syscall
    MIPS: R46000: Fix Micro-assembler field overflow for R4600 V2
    MIPS: ptrace: Avoid smp_processor_id() in preemptible code
    MIPS: Lemote 2F: cs5536: mfgpt: use raw locks
    MIPS: SB1: Fix excessive kernel warnings.
    MIPS: RC32434: fix broken PCI resource initialization
    MIPS: malta: memory.c: Initialize the 'memsize' variable
    MIPS: Fix typo when reporting cache and ftlb errors for ImgTec cores
    MIPS: Fix inconsistancy of __NR_Linux_syscalls value
    MIPS: Fix branch emulation of branch likely instructions.
    MIPS: Fix a typo error in AUDIT_ARCH definition
    sched: Fix hotplug vs. set_cpus_allowed_ptr()
    sched/cpupri: Replace NR_CPUS arrays
    sched/deadline: Replace NR_CPUS arrays
    sched/deadline: Restrict user params max value to 2^63 ns
    sched/deadline: Change sched_getparam() behaviour vs SCHED_DEADLINE
    sched: Disallow sched_attr::sched_policy < 0
    sched: Make sched_setattr() correctly return -EFBIG
    MIPS: Change type of asid_cache to unsigned long

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • Linus Torvalds
     
  • Pull powerpc fix from Ben Herrenschmidt:
    "Here's just one trivial patch to wire up sys_renameat2 which I seem to
    have completely missed so far.

    (My test build scripts fwd me warnings but miss the ones generated for
    missing syscalls)"

    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc: Wire renameat2() syscall

    Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:
    "A fair number of fixes across the field. Nothing terribly
    complicated; the one liners in below changelog should be fairly
    descriptive.

    Noteworthy is the SB1 change which the result of changes to binutils
    resulting in one big gas warning for most files being assembled as
    well as the asid_cache and branch emulation fixes which fix corruption
    or possible uninteded behaviour of kernel or application code. The
    remainder of fixes are more platforms or subsystem specific"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: R46000: Fix Micro-assembler field overflow for R4600 V2
    MIPS: ptrace: Avoid smp_processor_id() in preemptible code
    MIPS: Lemote 2F: cs5536: mfgpt: use raw locks
    MIPS: SB1: Fix excessive kernel warnings.
    MIPS: RC32434: fix broken PCI resource initialization
    MIPS: malta: memory.c: Initialize the 'memsize' variable
    MIPS: Fix typo when reporting cache and ftlb errors for ImgTec cores
    MIPS: Fix inconsistancy of __NR_Linux_syscalls value
    MIPS: Fix branch emulation of branch likely instructions.
    MIPS: Fix a typo error in AUDIT_ARCH definition
    MIPS: Change type of asid_cache to unsigned long

    Linus Torvalds
     
  • Pull scheduler fixes from Ingo Molnar:
    "Various fixlets, mostly related to the (root-only) SCHED_DEADLINE
    policy, but also a hotplug bug fix and a fix for a NR_CPUS related
    overallocation bug causing a suspend/resume regression"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched: Fix hotplug vs. set_cpus_allowed_ptr()
    sched/cpupri: Replace NR_CPUS arrays
    sched/deadline: Replace NR_CPUS arrays
    sched/deadline: Restrict user params max value to 2^63 ns
    sched/deadline: Change sched_getparam() behaviour vs SCHED_DEADLINE
    sched: Disallow sched_attr::sched_policy < 0
    sched: Make sched_setattr() correctly return -EFBIG

    Linus Torvalds
     
  • Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     

01 Jun, 2014

4 commits

  • …/linux into ti-linux-3.15.y

    * 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux:
    dcache: add missing lockdep annotation
    drm/radeon: Resume fbcon last
    drm/radeon: only allocate necessary size for vm bo list
    drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission
    drm/radeon: avoid crash if VM command submission isn't available
    drm/radeon: lower the ref * post PLL maximum once more
    rtmutex: Fix deadlock detector for real
    drm/i915: Prevent negative relocation deltas from wrapping
    drm/i915: Only copy back the modified fields to userspace from execbuffer
    drm/i915: Fix dynamic allocation of physical handles
    futex: Prevent attaching to kernel threads
    futex: Add another early deadlock detection check

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • Pull core futex/rtmutex fixes from Thomas Gleixner:
    "Three fixlets for long standing issues in the futex/rtmutex code
    unearthed by Dave Jones syscall fuzzer:

    - Add missing early deadlock detection checks in the futex code
    - Prevent user space from attaching a futex to kernel threads
    - Make the deadlock detector of rtmutex work again

    Looks large, but is more comments than code change"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    rtmutex: Fix deadlock detector for real
    futex: Prevent attaching to kernel threads
    futex: Add another early deadlock detection check

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Mostly quiet now:

    i915:
    fixing userspace visiblie issues, all stable marked

    radeon:
    one more pll fix, two crashers, one suspend/resume regression"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon: Resume fbcon last
    drm/radeon: only allocate necessary size for vm bo list
    drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission
    drm/radeon: avoid crash if VM command submission isn't available
    drm/radeon: lower the ref * post PLL maximum once more
    drm/i915: Prevent negative relocation deltas from wrapping
    drm/i915: Only copy back the modified fields to userspace from execbuffer
    drm/i915: Fix dynamic allocation of physical handles

    Linus Torvalds
     
  • lock_parent() very much on purpose does nested locking of dentries, and
    is careful to maintain the right order (lock parent first). But because
    it didn't annotate the nested locking order, lockdep thought it might be
    a deadlock on d_lock, and complained.

    Add the proper annotation for the inner locking of the child dentry to
    make lockdep happy.

    Introduced by commit 046b961b45f9 ("shrink_dentry_list(): take parent's
    ->d_lock earlier").

    Reported-and-tested-by: Josh Boyer
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

31 May, 2014

9 commits

  • So a few people complained that

    commit 177cf92de4aa97ec1435987e91696ed8b5023130
    Author: Daniel Vetter
    Date: Tue Apr 1 22:14:59 2014 +0200

    drm/crtc-helpers: fix dpms on logic

    which was merged into 3.15-rc1, broke resume on radeons. Strangely git
    bisect lead everyone to

    commit 25f397a429dfa43f22c278d0119a60a343aa568f
    Author: Daniel Vetter
    Date: Fri Jul 19 18:57:11 2013 +0200

    drm/crtc-helper: explicit DPMS on after modeset

    which was merged long ago and actually part of 3.14.

    Digging deeper I've noticed (again) that the call to
    drm_helper_resume_force_mode in the radeon resume handlers was a no-op
    previously because everything gets shut down on suspend. radeon does
    this with explicit calls to drm_helper_connector_dpms with DPMS_OFF.
    But with 177c we now force the dpms state to ON, so suddenly
    resume_force_mode actually forced the crtcs back on.

    This is the intention of the change after all, the problem is that
    radeon resumes the fbdev console layer _before_ restoring the display,
    through calling fb_set_suspend. And fbcon does an immediate ->set_par,
    which in turn causes the same forced mode restore to happen.

    Two concurrent modeset operations didn't lead to happiness. Fix this
    by delaying the fbcon resume until the end of the readeon resum
    functions.

    v2: Fix up a bit of the spelling fail.

    References: https://lkml.org/lkml/2014/5/29/1043
    References: https://lkml.org/lkml/2014/5/2/388
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=74751
    Tested-by: Ken Moffat
    Cc: Alex Deucher
    Cc: Ken Moffat
    Signed-off-by: Daniel Vetter
    Signed-off-by: Dave Airlie

    Daniel Vetter
     
  • this is the next pull request for stashed up radeon fixes for 3.15. This is finally calming down with only four patches in this pull request.

    * 'drm-fixes-3.15' of git://people.freedesktop.org/~deathsimple/linux:
    drm/radeon: only allocate necessary size for vm bo list
    drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission
    drm/radeon: avoid crash if VM command submission isn't available
    drm/radeon: lower the ref * post PLL maximum once more

    Dave Airlie
     
  • …/linux into ti-linux-3.15.y

    * 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux:
    x86_64: expand kernel stack to 16K
    firewire: revert to 4 GB RDMA, fix protocols using Memory Space
    dm mpath: really fix lockdep warning
    dm cache: always split discards on cache block boundaries
    Input: synaptics - change min/max quirk table to pnp-id matching
    Input: synaptics - add a matches_pnp_id helper function
    Input: synaptics - T540p - unify with other LEN0034 models
    dm thin: add 'no_space_timeout' dm-thin-pool module param
    Input: synaptics - add min/max quirk for the ThinkPad W540
    Input: ambakmi - request a shared interrupt for AMBA KMI devices
    Input: pxa27x-keypad - fix generating scancode
    Input: atmel-wm97xx - only build for AVR32
    Input: fix ps2/serio module dependency

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • Pull input subsystem fixes from Dmitry Torokhov:
    "A couple of driver/build fixups and also redone quirk for Synaptics
    touchpads on Lenovo boxes (now using PNP IDs instead of DMI data to
    limit number of quirks)"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: synaptics - change min/max quirk table to pnp-id matching
    Input: synaptics - add a matches_pnp_id helper function
    Input: synaptics - T540p - unify with other LEN0034 models
    Input: synaptics - add min/max quirk for the ThinkPad W540
    Input: ambakmi - request a shared interrupt for AMBA KMI devices
    Input: pxa27x-keypad - fix generating scancode
    Input: atmel-wm97xx - only build for AVR32
    Input: fix ps2/serio module dependency

    Linus Torvalds
     
  • Pull firewire fix from Stefan Richter:
    "A regression fix for the IEEE 1394 subsystem: re-enable IRQ-based
    asynchronous request reception at addresses below 128 TB"

    * tag 'firewire-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
    firewire: revert to 4 GB RDMA, fix protocols using Memory Space

    Linus Torvalds
     
  • …/linux into ti-linux-3.15.y

    * 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux:
    dentry_kill() doesn't need the second argument now
    dealing with the rest of shrink_dentry_list() livelock
    shrink_dentry_list(): take parent's ->d_lock earlier
    expand dentry_kill(dentry, 0) in shrink_dentry_list()
    split dentry_kill()
    lift the "already marked killed" case into shrink_dentry_list()

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • Pull device-mapper fixes from Mike Snitzer:
    "A dm-cache stable fix to split discards on cache block boundaries
    because dm-cache cannot yet handle discards that span cache blocks.

    Really fix a dm-mpath LOCKDEP warning that was introduced in -rc1.

    Add a 'no_space_timeout' control to dm-thinp to restore the ability to
    queue IO indefinitely when no data space is available. This fixes a
    change in behavior that was introduced in -rc6 where the timeout
    couldn't be disabled"

    * tag 'dm-3.15-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm mpath: really fix lockdep warning
    dm cache: always split discards on cache block boundaries
    dm thin: add 'no_space_timeout' dm-thin-pool module param

    Linus Torvalds
     
  • While I play inhouse patches with much memory pressure on qemu-kvm,
    3.14 kernel was randomly crashed. The reason was kernel stack overflow.

    When I investigated the problem, the callstack was a little bit deeper
    by involve with reclaim functions but not direct reclaim path.

    I tried to diet stack size of some functions related with alloc/reclaim
    so did a hundred of byte but overflow was't disappeard so that I encounter
    overflow by another deeper callstack on reclaim/allocator path.

    Of course, we might sweep every sites we have found for reducing
    stack usage but I'm not sure how long it saves the world(surely,
    lots of developer start to add nice features which will use stack
    agains) and if we consider another more complex feature in I/O layer
    and/or reclaim path, it might be better to increase stack size(
    meanwhile, stack usage on 64bit machine was doubled compared to 32bit
    while it have sticked to 8K. Hmm, it's not a fair to me and arm64
    already expaned to 16K. )

    So, my stupid idea is just let's expand stack size and keep an eye
    toward stack consumption on each kernel functions via stacktrace of ftrace.
    For example, we can have a bar like that each funcion shouldn't exceed 200K
    and emit the warning when some function consumes more in runtime.
    Of course, it could make false positive but at least, it could make a
    chance to think over it.

    I guess this topic was discussed several time so there might be
    strong reason not to increase kernel stack size on x86_64, for me not
    knowing so Ccing x86_64 maintainers, other MM guys and virtio
    maintainers.

    Here's an example call trace using up the kernel stack:

    Depth Size Location (51 entries)
    ----- ---- --------
    0) 7696 16 lookup_address
    1) 7680 16 _lookup_address_cpa.isra.3
    2) 7664 24 __change_page_attr_set_clr
    3) 7640 392 kernel_map_pages
    4) 7248 256 get_page_from_freelist
    5) 6992 352 __alloc_pages_nodemask
    6) 6640 8 alloc_pages_current
    7) 6632 168 new_slab
    8) 6464 8 __slab_alloc
    9) 6456 80 __kmalloc
    10) 6376 376 vring_add_indirect
    11) 6000 144 virtqueue_add_sgs
    12) 5856 288 __virtblk_add_req
    13) 5568 96 virtio_queue_rq
    14) 5472 128 __blk_mq_run_hw_queue
    15) 5344 16 blk_mq_run_hw_queue
    16) 5328 96 blk_mq_insert_requests
    17) 5232 112 blk_mq_flush_plug_list
    18) 5120 112 blk_flush_plug_list
    19) 5008 64 io_schedule_timeout
    20) 4944 128 mempool_alloc
    21) 4816 96 bio_alloc_bioset
    22) 4720 48 get_swap_bio
    23) 4672 160 __swap_writepage
    24) 4512 32 swap_writepage
    25) 4480 320 shrink_page_list
    26) 4160 208 shrink_inactive_list
    27) 3952 304 shrink_lruvec
    28) 3648 80 shrink_zone
    29) 3568 128 do_try_to_free_pages
    30) 3440 208 try_to_free_pages
    31) 3232 352 __alloc_pages_nodemask
    32) 2880 8 alloc_pages_current
    33) 2872 200 __page_cache_alloc
    34) 2672 80 find_or_create_page
    35) 2592 80 ext4_mb_load_buddy
    36) 2512 176 ext4_mb_regular_allocator
    37) 2336 128 ext4_mb_new_blocks
    38) 2208 256 ext4_ext_map_blocks
    39) 1952 160 ext4_map_blocks
    40) 1792 384 ext4_writepages
    41) 1408 16 do_writepages
    42) 1392 96 __writeback_single_inode
    43) 1296 176 writeback_sb_inodes
    44) 1120 80 __writeback_inodes_wb
    45) 1040 160 wb_writeback
    46) 880 208 bdi_writeback_workfn
    47) 672 144 process_one_work
    48) 528 112 worker_thread
    49) 416 240 kthread
    50) 176 176 ret_from_fork

    [ Note: the problem is exacerbated by certain gcc versions that seem to
    generate much bigger stack frames due to apparently bad coalescing of
    temporaries and generating too many spills. Rusty saw gcc-4.6.4 using
    35% more stack on the virtio path than 4.8.2 does, for example.

    Minchan not only uses such a bad gcc version (4.6.3 in his case), but
    some of the stack use is due to debugging (CONFIG_DEBUG_PAGEALLOC is
    what causes that kernel_map_pages() frame, for example). But we're
    clearly getting too close.

    The VM code also seems to have excessive stack frames partly for the
    same compiler reason, triggered by excessive inlining and lots of
    function arguments.

    We need to improve on our stack use, but in the meantime let's do this
    simple stack increase too. Unlike most earlier reports, there is
    nothing simple that stands out as being really horribly wrong here,
    apart from the fact that the stack frames are just bigger than they
    should need to be. - Linus ]

    Signed-off-by: Minchan Kim
    Cc: Peter Anvin
    Cc: Dave Chinner
    Cc: Dave Jones
    Cc: Jens Axboe
    Cc: Andrew Morton
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Mel Gorman
    Cc: Rik van Riel
    Cc: Johannes Weiner
    Cc: Hugh Dickins
    Cc: Rusty Russell
    Cc: Michael S Tsirkin
    Cc: Dave Hansen
    Cc: Steven Rostedt
    Cc: PJ Waskiewicz
    Signed-off-by: Linus Torvalds

    Minchan Kim
     
  • Pull vfs dcache livelock fix from Al Viro:
    "Fixes for livelocks in shrink_dentry_list() introduced by fixes to
    shrink list corruption; the root cause was that trylock of parent's
    ->d_lock could be disrupted by d_walk() happening on other CPUs,
    resulting in shrink_dentry_list() making no progress *and* the same
    d_walk() being called again and again for as long as
    shrink_dentry_list() doesn't get past that mess.

    The solution is to have shrink_dentry_list() treat that trylock
    failure not as 'try to do the same thing again', but 'lock them in the
    right order'"

    * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    dentry_kill() doesn't need the second argument now
    dealing with the rest of shrink_dentry_list() livelock
    shrink_dentry_list(): take parent's ->d_lock earlier
    expand dentry_kill(dentry, 0) in shrink_dentry_list()
    split dentry_kill()
    lift the "already marked killed" case into shrink_dentry_list()

    Linus Torvalds
     

30 May, 2014

13 commits

  • it's 1 in the only remaining caller.

    Signed-off-by: Al Viro

    Al Viro
     
  • We have the same problem with ->d_lock order in the inner loop, where
    we are dropping references to ancestors. Same solution, basically -
    instead of using dentry_kill() we use lock_parent() (introduced in the
    previous commit) to get that lock in a safe way, recheck ->d_count
    (in case if lock_parent() has ended up dropping and retaking ->d_lock
    and somebody managed to grab a reference during that window), trylock
    the inode->i_lock and use __dentry_kill() to do the rest.

    Signed-off-by: Al Viro

    Al Viro
     
  • The cause of livelocks there is that we are taking ->d_lock on
    dentry and its parent in the wrong order, forcing us to use
    trylock on the parent's one. d_walk() takes them in the right
    order, and unfortunately it's not hard to create a situation
    when shrink_dentry_list() can't make progress since trylock
    keeps failing, and shrink_dcache_parent() or check_submounts_and_drop()
    keeps calling d_walk() disrupting the very shrink_dentry_list() it's
    waiting for.

    Solution is straightforward - if that trylock fails, let's unlock
    the dentry itself and take locks in the right order. We need to
    stabilize ->d_parent without holding ->d_lock, but that's doable
    using RCU. And we'd better do that in the very beginning of the
    loop in shrink_dentry_list(), since the checks on refcount, etc.
    would need to be redone anyway.

    That deals with a half of the problem - killing dentries on the
    shrink list itself. Another one (dropping their parents) is
    in the next commit.

    locking parent is interesting - it would be easy to do rcu_read_lock(),
    lock whatever we think is a parent, lock dentry itself and check
    if the parent is still the right one. Except that we need to check
    that *before* locking the dentry, or we are risking taking ->d_lock
    out of order. Fortunately, once the D1 is locked, we can check if
    D2->d_parent is equal to D1 without the need to lock D2; D2->d_parent
    can start or stop pointing to D1 only under D1->d_lock, so taking
    D1->d_lock is enough. In other words, the right solution is
    rcu_read_lock/lock what looks like parent right now/check if it's
    still our parent/rcu_read_unlock/lock the child.

    Signed-off-by: Al Viro

    Al Viro
     
  • No need to always allocate the theoretical maximum here.

    Signed-off-by: Christian König

    Christian König
     
  • It hangs the hardware.

    Signed-off-by: Marek Olšák
    Reviewed-by: Christian König
    Cc: stable@vger.kernel.org

    Marek Olšák
     
  • Signed-off-by: Christian König
    CC: stable@vger.kernel.org

    Christian König
     
  • Let's be conservative and use 100 here until we find something better.

    Bugs: https://bugzilla.kernel.org/show_bug.cgi?id=75241

    Signed-off-by: Christian König

    Christian König
     
  • …/linux into ti-linux-3.15.y

    * 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux:
    ARM: 8063/1: bL_switcher: fix individual online status reporting of removed CPUs
    ARM: 8064/1: fix v7-M signal return
    ARM: 8057/1: amba: Add Qualcomm vendor ID.
    ARM: 8052/1: unwind: Fix handling of "Pop r4-r[4+nnn],r14" opcode
    ARM: 8051/1: put_user: fix possible data corruption in put_user
    ARM: 8048/1: fix v7-M setup stack location

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • Pull ARM fixes from Russell King:
    "The usual random collection of relatively small ARM fixes"

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 8063/1: bL_switcher: fix individual online status reporting of removed CPUs
    ARM: 8064/1: fix v7-M signal return
    ARM: 8057/1: amba: Add Qualcomm vendor ID.
    ARM: 8052/1: unwind: Fix handling of "Pop r4-r[4+nnn],r14" opcode
    ARM: 8051/1: put_user: fix possible data corruption in put_user
    ARM: 8048/1: fix v7-M setup stack location

    Linus Torvalds
     
  • …/linux into ti-linux-3.15.y

    * 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux:
    arm64: mm: fix pmd_write CoW brokenness
    ACPI / thermal: fix workqueue destroy order
    clk: st: Fix memory leak
    clk: divider: Fix table round up function
    cpufreq: cpu0: drop wrong devm usage
    cpufreq: remove race while accessing cur_policy
    clk: tegra: Fix enabling of PLLE
    clk: tegra: Introduce divider mask and shift helpers
    clk: tegra: Fix PLLE programming

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • Pull arm64 fix from Will Deacon:
    "Fix CoW regression for transparent hugepages by routing set_pmd_at to
    set_pte_at, which correctly handles PTE_WRITE and will mark the
    resulting table entry as read-only where appropriate"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: mm: fix pmd_write CoW brokenness

    Linus Torvalds
     
  • Pull ACPI and power management fixes from Rafael Wysocki:
    "These are three stable-candidate fixes, one for the ACPI thermal
    driver and two for cpufreq drivers.

    Specifics:

    - A workqueue is destroyed too early during the ACPI thermal driver
    module unload which leads to a NULL pointer dereference in the
    driver's remove callback. Fix from Aaron Lu.

    - A wrong argument is passed to devm_regulator_get_optional() in the
    probe routine of the cpu0 cpufreq driver which leads to resource
    leaks if the driver is unbound from the cpufreq platform device.
    Fix from Lucas Stach.

    - A lock is missing in cpufreq_governor_dbs() which leads to memory
    corruption and NULL pointer dereferences during system
    suspend/resume, for example. Fix from Bibek Basu"

    * tag 'pm+acpi-3.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / thermal: fix workqueue destroy order
    cpufreq: cpu0: drop wrong devm usage
    cpufreq: remove race while accessing cur_policy

    Linus Torvalds
     
  • Pull clock fixes from Mike Turquette:
    "Small number of user-visible regression fixes for clock drivers.

    There is a memory leak fix for an ST platform, an infinite Loop Of
    Doom fix for the recent changes to the basic clock divider (hopefully
    the last fix for those recent changes) and some Tegra PLL changes
    which keep PCI from being hosed on that platform"

    * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux:
    clk: st: Fix memory leak
    clk: divider: Fix table round up function
    clk: tegra: Fix enabling of PLLE
    clk: tegra: Introduce divider mask and shift helpers
    clk: tegra: Fix PLLE programming

    Linus Torvalds
     

29 May, 2014

2 commits

  • Undo a feature introduced in v3.14 by commit fcd46b34425d
    "firewire: Enable remote DMA above 4 GB". That change raised the
    minimum address at which protocol drivers and user programs can register
    for request reception from 0x0001'0000'0000 to 0x8000'0000'0000.
    It turned out that at least one vendor-specific protocol exists which
    uses lower addresses: https://bugzilla.kernel.org/show_bug.cgi?id=76921

    For the time being, revert most of commit fcd46b34425d so that affected
    protocols work like with kernel v3.13 and before. Just keep the valid
    documentation parts from the regressing commit, and the ability to
    identify controllers which could be programmed to accept >32 bit
    physical DMA addresses. The rest of fcd46b34425d should probably be
    brought back as an optional instead of default feature.

    Reported-by: Fabien Spindler
    Cc: # 3.14+
    Signed-off-by: Stefan Richter

    Stefan Richter
     
  • Result will be massaged to saner shape in the next commits. It is
    ugly, no questions - the point of that one is to be a provably
    equivalent transformation (and it might be worth splitting a bit
    more).

    Signed-off-by: Al Viro

    Al Viro