07 Aug, 2015

4 commits

  • Dave Hansen reported the following;

    My laptop has been behaving strangely with 4.2-rc2. Once I log
    in to my X session, I start getting all kinds of strange errors
    from applications and see this in my dmesg:

    VFS: file-max limit 8192 reached

    The problem is that the file-max is calculated before memory is fully
    initialised and miscalculates how much memory the kernel is using. This
    patch recalculates file-max after deferred memory initialisation. Note
    that using memory hotplug infrastructure would not have avoided this
    problem as the value is not recalculated after memory hot-add.

    4.1: files_stat.max_files = 6582781
    4.2-rc2: files_stat.max_files = 8192
    4.2-rc2 patched: files_stat.max_files = 6562467

    Small differences with the patch applied and 4.1 but not enough to matter.

    Signed-off-by: Mel Gorman
    Reported-by: Dave Hansen
    Cc: Nicolai Stange
    Cc: Dave Hansen
    Cc: Alex Ng
    Cc: Fengguang Wu
    Cc: Peter Zijlstra (Intel)
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • Commit 0e1cc95b4cc7 ("mm: meminit: finish initialisation of struct pages
    before basic setup") introduced a rwsem to signal completion of the
    initialization workers.

    Lockdep complains about possible recursive locking:
    =============================================
    [ INFO: possible recursive locking detected ]
    4.1.0-12802-g1dc51b8 #3 Not tainted
    ---------------------------------------------
    swapper/0/1 is trying to acquire lock:
    (pgdat_init_rwsem){++++.+},
    at: [] page_alloc_init_late+0xc7/0xe6

    but task is already holding lock:
    (pgdat_init_rwsem){++++.+},
    at: [] page_alloc_init_late+0x3e/0xe6

    Replace the rwsem by a completion together with an atomic
    "outstanding work counter".

    [peterz@infradead.org: Barrier removal on the grounds of being pointless]
    [mgorman@suse.de: Applied review feedback]
    Signed-off-by: Nicolai Stange
    Signed-off-by: Mel Gorman
    Acked-by: Peter Zijlstra (Intel)
    Cc: Dave Hansen
    Cc: Alex Ng
    Cc: Fengguang Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolai Stange
     
  • early_pfn_to_nid() historically was inherently not SMP safe but only
    used during boot which is inherently single threaded or during hotplug
    which is protected by a giant mutex.

    With deferred memory initialisation there was a thread-safe version
    introduced and the early_pfn_to_nid would trigger a BUG_ON if used
    unsafely. Memory hotplug hit that check. This patch makes
    early_pfn_to_nid introduces a lock to make it safe to use during
    hotplug.

    Signed-off-by: Mel Gorman
    Reported-by: Alex Ng
    Tested-by: Alex Ng
    Acked-by: Peter Zijlstra (Intel)
    Cc: Nicolai Stange
    Cc: Dave Hansen
    Cc: Fengguang Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • A while back, the message queue implementation in the kernel was
    improved to use btrees to speed up retrieval of messages, in commit
    d6629859b36d ("ipc/mqueue: improve performance of send/recv").

    That patch introducing the improved kernel handling of message queues
    (using btrees) has, as a by-product, changed the meaning of the QSIZE
    field in the pseudo-file created for the queue. Before, this field
    reflected the size of the user-data in the queue. Since, it also takes
    kernel data structures into account. For example, if 13 bytes of user
    data are in the queue, on my machine the file reports a size of 61
    bytes.

    There was some discussion on this topic before (for example
    https://lkml.org/lkml/2014/10/1/115). Commenting on a th lkml, Michael
    Kerrisk gave the following background
    (https://lkml.org/lkml/2015/6/16/74):

    The pseudofiles in the mqueue filesystem (usually mounted at
    /dev/mqueue) expose fields with metadata describing a message
    queue. One of these fields, QSIZE, as originally implemented,
    showed the total number of bytes of user data in all messages in
    the message queue, and this feature was documented from the
    beginning in the mq_overview(7) page. In 3.5, some other (useful)
    work happened to break the user-space API in a couple of places,
    including the value exposed via QSIZE, which now includes a measure
    of kernel overhead bytes for the queue, a figure that renders QSIZE
    useless for its original purpose, since there's no way to deduce
    the number of overhead bytes consumed by the implementation.
    (The other user-space breakage was subsequently fixed.)

    This patch removes the accounting of kernel data structures in the
    queue. Reporting the size of these data-structures in the QSIZE field
    was a breaking change (see Michael's comment above). Without the QSIZE
    field reporting the total size of user-data in the queue, there is no
    way to deduce this number.

    It should be noted that the resource limit RLIMIT_MSGQUEUE is counted
    against the worst-case size of the queue (in both the old and the new
    implementation). Therefore, the kernel overhead accounting in QSIZE is
    not necessary to help the user understand the limitations RLIMIT imposes
    on the processes.

    Signed-off-by: Marcus Gelderie
    Acked-by: Doug Ledford
    Acked-by: Michael Kerrisk
    Acked-by: Davidlohr Bueso
    Cc: David Howells
    Cc: Alexander Viro
    Cc: John Duffy
    Cc: Arto Bendiken
    Cc: Manfred Spraul
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcus Gelderie
     

05 Aug, 2015

6 commits

  • Pull KVM fixes from Paolo Bonzini:
    "Just two very small & simple patches"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: MTRR: Use default type for non-MTRR-covered gfn before WARN_ON
    KVM: s390: Fix hang VCPU hang/loop regression

    Linus Torvalds
     
  • The patch was munged on commit to re-order these tests resulting in
    excessive warnings when trying to do device assignment. Return to
    original ordering: https://lkml.org/lkml/2015/7/15/769

    Fixes: 3e5d2fdceda1 ("KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type")
    Signed-off-by: Alex Williamson
    Reviewed-by: Xiao Guangrong
    Signed-off-by: Paolo Bonzini

    Alex Williamson
     
  • Pull md fixes from Neil Brown:
    "Three more fixes for md in 4.2

    Mostly corner-case stuff.

    One of these patches is for a CVE: CVE-2015-5697

    I'm not convinced it is serious (data leak from CAP_SYS_ADMIN ioctl)
    but as people seem to want to back-port it, I've included a minimal
    version here. The remainder of that patch from Benjamin is
    code-cleanup and will arrive in the 4.3 merge window"

    * tag 'md/4.2-rc5-fixes' of git://neil.brown.name/md:
    md/raid5: don't let shrink_slab shrink too far.
    md: use kzalloc() when bitmap is disabled
    md/raid1: extend spinlock to protect raid1_end_read_request against inconsistencies

    Linus Torvalds
     
  • Pull nfsd fixes from Bruce Fields.

    * 'for-4.2' of git://linux-nfs.org/~bfields/linux:
    nfsd: do nfs4_check_fh in nfs4_check_file instead of nfs4_check_olstateid
    nfsd: Fix a file leak on nfsd4_layout_setlease failure
    nfsd: Drop BUG_ON and ignore SECLABEL on absent filesystem

    Linus Torvalds
     
  • Nikolay has reported a hang when a memcg reclaim got stuck with the
    following backtrace:

    PID: 18308 TASK: ffff883d7c9b0a30 CPU: 1 COMMAND: "rsync"
    #0 __schedule at ffffffff815ab152
    #1 schedule at ffffffff815ab76e
    #2 schedule_timeout at ffffffff815ae5e5
    #3 io_schedule_timeout at ffffffff815aad6a
    #4 bit_wait_io at ffffffff815abfc6
    #5 __wait_on_bit at ffffffff815abda5
    #6 wait_on_page_bit at ffffffff8111fd4f
    #7 shrink_page_list at ffffffff81135445
    #8 shrink_inactive_list at ffffffff81135845
    #9 shrink_lruvec at ffffffff81135ead
    #10 shrink_zone at ffffffff811360c3
    #11 shrink_zones at ffffffff81136eff
    #12 do_try_to_free_pages at ffffffff8113712f
    #13 try_to_free_mem_cgroup_pages at ffffffff811372be
    #14 try_charge at ffffffff81189423
    #15 mem_cgroup_try_charge at ffffffff8118c6f5
    #16 __add_to_page_cache_locked at ffffffff8112137d
    #17 add_to_page_cache_lru at ffffffff81121618
    #18 pagecache_get_page at ffffffff8112170b
    #19 grow_dev_page at ffffffff811c8297
    #20 __getblk_slow at ffffffff811c91d6
    #21 __getblk_gfp at ffffffff811c92c1
    #22 ext4_ext_grow_indepth at ffffffff8124565c
    #23 ext4_ext_create_new_leaf at ffffffff81246ca8
    #24 ext4_ext_insert_extent at ffffffff81246f09
    #25 ext4_ext_map_blocks at ffffffff8124a848
    #26 ext4_map_blocks at ffffffff8121a5b7
    #27 mpage_map_one_extent at ffffffff8121b1fa
    #28 mpage_map_and_submit_extent at ffffffff8121f07b
    #29 ext4_writepages at ffffffff8121f6d5
    #30 do_writepages at ffffffff8112c490
    #31 __filemap_fdatawrite_range at ffffffff81120199
    #32 filemap_flush at ffffffff8112041c
    #33 ext4_alloc_da_blocks at ffffffff81219da1
    #34 ext4_rename at ffffffff81229b91
    #35 ext4_rename2 at ffffffff81229e32
    #36 vfs_rename at ffffffff811a08a5
    #37 SYSC_renameat2 at ffffffff811a3ffc
    #38 sys_renameat2 at ffffffff811a408e
    #39 sys_rename at ffffffff8119e51e
    #40 system_call_fastpath at ffffffff815afa89

    Dave Chinner has properly pointed out that this is a deadlock in the
    reclaim code because ext4 doesn't submit pages which are marked by
    PG_writeback right away.

    The heuristic was introduced by commit e62e384e9da8 ("memcg: prevent OOM
    with too many dirty pages") and it was applied only when may_enter_fs
    was specified. The code has been changed by c3b94f44fcb0 ("memcg:
    further prevent OOM with too many dirty pages") which has removed the
    __GFP_FS restriction with a reasoning that we do not get into the fs
    code. But this is not sufficient apparently because the fs doesn't
    necessarily submit pages marked PG_writeback for IO right away.

    ext4_bio_write_page calls io_submit_add_bh but that doesn't necessarily
    submit the bio. Instead it tries to map more pages into the bio and
    mpage_map_one_extent might trigger memcg charge which might end up
    waiting on a page which is marked PG_writeback but hasn't been submitted
    yet so we would end up waiting for something that never finishes.

    Fix this issue by replacing __GFP_IO by may_enter_fs check (for case 2)
    before we go to wait on the writeback. The page fault path, which is
    the only path that triggers memcg oom killer since 3.12, shouldn't
    require GFP_NOFS and so we shouldn't reintroduce the premature OOM
    killer issue which was originally addressed by the heuristic.

    As per David Chinner the xfs is doing similar thing since 2.6.15 already
    so ext4 is not the only affected filesystem. Moreover he notes:

    : For example: IO completion might require unwritten extent conversion
    : which executes filesystem transactions and GFP_NOFS allocations. The
    : writeback flag on the pages can not be cleared until unwritten
    : extent conversion completes. Hence memory reclaim cannot wait on
    : page writeback to complete in GFP_NOFS context because it is not
    : safe to do so, memcg reclaim or otherwise.

    Cc: stable@vger.kernel.org # 3.9+
    [tytso@mit.edu: corrected the control flow]
    Fixes: c3b94f44fcb0 ("memcg: further prevent OOM with too many dirty pages")
    Reported-by: Nikolay Borisov
    Signed-off-by: Michal Hocko
    Signed-off-by: Hugh Dickins
    Signed-off-by: Linus Torvalds

    Michal Hocko
     
  • Pull PCI fix from Bjorn Helgaas:
    "This is a trivial fix for a change that broke user program compilation
    (QEMU in this case)"

    * tag 'pci-v4.2-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI: Restore PCI_MSIX_FLAGS_BIRMASK definition

    Linus Torvalds
     

04 Aug, 2015

13 commits

  • Pull drm mst fixes from Daniel Vetter:
    "Special pull request for mst fixes since most of the patches touch
    code outside of i915 proper. DRM parts have also been reviewed by
    Thierry (nvidia) since Dave's enjoying vacations"

    * tag 'topic/mst-fixes-2015-08-04' of git://anongit.freedesktop.org/drm-intel:
    drm/atomic-helpers: Make encoder picking more robust
    drm/dp-mst: Remove debug WARN_ON
    drm/i915: Fixup dp mst encoder selection
    drm/atomic-helper: Add an atomice best_encoder callback

    Linus Torvalds
     
  • Pull xen bug fixes from David Vrabel:

    - don't lose interrupts when offlining CPUs

    - fix gntdev oops during unmap

    - drop the balloon lock occasionally to allow domain create/destroy

    * tag 'for-linus-4.2-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen/events/fifo: Handle linked events when closing a port
    xen: release lock occasionally during ballooning
    xen/gntdevt: Fix race condition in gntdev_release()

    Linus Torvalds
     
  • An event channel bound to a CPU that was offlined may still be linked
    on that CPU's queue. If this event channel is closed and reused,
    subsequent events will be lost because the event channel is never
    unlinked and thus cannot be linked onto the correct queue.

    When a channel is closed and the event is still linked into a queue,
    ensure that it is unlinked before completing.

    If the CPU to which the event channel bound is online, spin until the
    event is handled by that CPU. If that CPU is offline, it can't handle
    the event, so clear the event queue during the close, dropping the
    events.

    This fixes the missing interrupts (and subsequent disk stalls etc.)
    when offlining a CPU.

    Signed-off-by: Ross Lagerwall
    Cc:
    Signed-off-by: David Vrabel

    Ross Lagerwall
     
  • Pull kbuild fixes from Michal Marek:
    "Two fixes for kbuild:

    - The new ARCH_{CPP,A,C}FLAGS variables are reset before including
    the arch Makefile

    - Fix calling make modules_install twice when module compression is
    enabled"

    * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    Makefile: Force gzip and xz on module install
    kbuild: Do not pick up ARCH_{CPP,A,C}FLAGS from the environment

    Linus Torvalds
     
  • We've had a few issues with atomic where subtle bugs in the encoder
    picking logic lead to accidental self-stealing of the encoder,
    resulting in a NULL connector_state->crtc in update_connector_routing
    and subsequent.

    Linus applied some duct-tape for an mst regression in

    commit 27667f4744fc5a0f3e50910e78740bac5670d18b
    Author: Linus Torvalds
    Date: Wed Jul 29 22:18:16 2015 -0700

    i915: temporary fix for DP MST docking station NULL pointer dereference

    But that was incomplete (the code will still oops when debuggin is
    enabled) and mangled the state even further. So instead WARN and bail
    out as the more future-proof option.

    Cc: Theodore Ts'o
    Cc: Linus Torvalds
    Reviewed-by: Thierry Reding
    Reviewed-by: Ander Conselvan de Oliveira
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • Apparently been in there since forever and fairly easy to hit when
    hotplugging really fast. I can do that since my mst hub has a manual
    button to flick the hpd line for reprobing. The resulting WARNING spam
    isn't pretty.

    Cc: Dave Airlie
    Cc: stable@vger.kernel.org
    Reviewed-by: Thierry Reding
    Reviewed-by: Ander Conselvan de Oliveira
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • In

    commit 8c7b5ccb729870e606321b3703e2c2e698c49a95
    Author: Ander Conselvan de Oliveira
    Date: Tue Apr 21 17:13:19 2015 +0300

    drm/i915: Use atomic helpers for computing changed flags

    we've switched over to the atomic version to compute the
    crtc->encoder->connector routing from the i915 variant. That one
    relies upon the ->best_encoder callback, but the i915-private version
    relied upon intel_find_encoder. Which didn't matter except for dp mst,
    where the encoder depends upon the selected crtc.

    Fix this functional bug by implemented a correct atomic-state based
    encoder selector for dp mst.

    Note that we can't get rid of the legacy best_encoder callback since
    the fbdev emulation uses that still. That means it's incorrect there
    still, but that's been the case ever since i915 dp mst support was
    merged so not a regression. Best to fix that by converting fbdev over
    to atomic too.

    Cc: Chris Wilson
    Cc: Linus Torvalds
    Cc: Theodore Ts'o
    Reviewed-by: Ander Conselvan de Oliveira
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • With legacy helpers all the routing was already set up when calling
    best_encoder and so could be inspected. But with atomic it's staged,
    hence we need a new atomic compliant callback for drivers which need
    to inspect the requested state and can't just decided the best encoder
    statically.

    This is needed to fix up i915 dp mst where we need to pick the right
    encoder depending upon the requested CRTC for the connector.

    v2: Don't forget to amend the kerneldoc

    Cc: Chris Wilson
    Cc: Linus Torvalds
    Cc: Theodore Ts'o
    Acked-by: Thierry Reding
    Reviewed-by: Ander Conselvan de Oliveira
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • Pull i2c fixes from Wolfram Sang:
    "A refcounting bugfix for the i2c-core, bugfixes for the generic bus
    recovery algorithm and for its omap-user, making binary file
    attributes for EEPROMs behave POSIX compliant, and a small typo fix
    while we are here"

    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: fix leaked device refcount on of_find_i2c_* error path
    i2c: Fix typo in i2c-bfin-twi.c
    i2c: omap: fix bus recovery setup
    i2c: core: only use set_scl for bus recovery after calling prepare_recovery
    misc: eeprom: at24: clean up at24_bin_write()
    i2c: slave eeprom: clean up sysfs bin attribute read()/write()

    Linus Torvalds
     
  • Pull Ceph fixes from Sage Weil:
    "There are two critical regression fixes for CephFS from Zheng, and an
    RBD completion fix for layered images from Ilya"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    rbd: fix copyup completion race
    ceph: always re-send cap flushes when MDS recovers
    ceph: fix ceph_encode_locks_to_buffer()

    Linus Torvalds
     
  • Pull security layer fix from James Morris:
    "Yama initialization fix"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    Adding YAMA hooks also when YAMA is not stacked.

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:
    "This fixes the following issues:

    - a bogus BUG_ON in ixp4xx that can be triggered by a dst buffer that
    is an SG list.

    - the error handling in hwrngd may cause a crash in case of an error.

    - fix a race condition in qat registration when multiple devices are
    present"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    hwrng: core - correct error check of kthread_run call
    crypto: ixp4xx - Remove bogus BUG_ON on scattered dst buffer
    crypto: qat - Fix invalid synchronization between register/unregister sym algs

    Linus Torvalds
     
  • Pull module fix from Rusty Russell:
    "Single overzealous locking assertion fix"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    module: weaken locking assertion for oops path.

    Linus Torvalds
     

03 Aug, 2015

9 commits

  • Without this patch YAMA will not work at all if it is chosen
    as the primary LSM instead of being "stacked".

    Signed-off-by: Salvatore Mesoraca
    Acked-by: Kees Cook
    Signed-off-by: James Morris

    Salvatore Mesoraca
     
  • I have a report of drop_one_stripe() called from
    raid5_cache_scan() apparently finding ->max_nr_stripes == 0.

    This should not be allowed.

    So add a test to keep max_nr_stripes above min_nr_stripes.

    Also use a 'mask' rather than a 'mod' in drop_one_stripe
    to ensure 'hash' is valid even if max_nr_stripes does reach zero.

    Fixes: edbe83ab4c27 ("md/raid5: allow the stripe_cache to grow and shrink.")
    Cc: stable@vger.kernel.org (4.1 - please release with 2d5b569b665)
    Reported-by: Tomas Papan
    Signed-off-by: NeilBrown

    NeilBrown
     
  • In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
    mdu_bitmap_file_t called "file".

    5769 file = kmalloc(sizeof(*file), GFP_NOIO);
    5770 if (!file)
    5771 return -ENOMEM;

    This structure is copied to user space at the end of the function.

    5786 if (err == 0 &&
    5787 copy_to_user(arg, file, sizeof(*file)))
    5788 err = -EFAULT

    But if bitmap is disabled only the first byte of "file" is initialized
    with zero, so it's possible to read some bytes (up to 4095) of kernel
    space memory from user space. This is an information leak.

    5775 /* bitmap disabled, zero the first byte and copy out */
    5776 if (!mddev->bitmap_info.file)
    5777 file->pathname[0] = '\0';

    Signed-off-by: Benjamin Randazzo
    Signed-off-by: NeilBrown

    Benjamin Randazzo
     
  • raid1_end_read_request() assumes that the In_sync bits are consistent
    with the ->degaded count.
    raid1_spare_active updates the In_sync bit before the ->degraded count
    and so exposes an inconsistency, as does error()
    So extend the spinlock in raid1_spare_active() and error() to hide those
    inconsistencies.

    This should probably be part of
    Commit: 34cab6f42003 ("md/raid1: fix test for 'was read error from
    last working device'.")
    as it addresses the same issue. It fixes the same bug and should go
    to -stable for same reasons.

    Fixes: 76073054c95b ("md/raid1: clean up read_balance.")
    Cc: stable@vger.kernel.org (v3.0+)
    Signed-off-by: NeilBrown

    NeilBrown
     
  • Linus Torvalds
     
  • Pull powerpc fixes from Michael Ellerman:
    - TCE table memory calculation fix from Alexey
    - Build fix for ans-lcd from Luis
    - Unbalanced IRQ warning fix from Alistair

    * tag 'powerpc-4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/eeh-powernv: Fix unbalanced IRQ warning
    macintosh/ans-lcd: fix build failure after module_init/exit relocation
    powerpc/powernv/ioda2: Fix calculation for memory allocated for TCE table

    Linus Torvalds
     
  • Ted Ts'o reports that his Lenovo T540p ThinkPad crashes at boot if
    attached to the docking station. This is a regression that he was able
    to bisect to commit 8c7b5ccb7298: "drm/i915: Use atomic helpers for
    computing changed flags:"

    The reason seems to be the new call to drm_atomic_helper_check_modeset()
    added to intel_modeset_compute_config(), which in turn calls
    update_connector_routing(), and somehow ends up picking a NULL crtc for
    the connector state, causing the subsequent drm_crtc_index() to OOPS.

    Daniel Vetter says that the fundamental issue seems to be confusion in
    the encoder selection, and this isn't the right fix, but while he chases
    down the proper fix, this at least avoids the NULL pointer dereference
    and makes Ted's docking station work again.

    Reported-bisected-and-tested-by: Theodore Ts'o
    Cc: Daniel Vetter
    Cc: Mani Nikula
    Cc: Dave Airlie
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull SCSI fixes from James Bottomley:
    "A set of three fixes for the ipr driver and one fairly major one for
    memory leaks in the mq path of SCSI"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: fix memory leak with scsi-mq
    ipr: Fix invalid array indexing for HRRQ
    ipr: Fix incorrect trace indexing
    ipr: Fix locking for unit attention handling

    Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "Things are calming down nicely here w.r.t. fixes. This batch
    includes two week's worth since I missed to send before -rc4.

    Nothing particularly scary to point out, smaller fixes here and there.
    Shortlog describes it pretty well"

    * tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: dts: keystone: fix dt bindings to use post div register for mainpll
    ARM: nomadik: disable UART0 on Nomadik boards
    ARM: dts: i.MX35: Fix can support.
    ARM: OMAP2+: hwmod: Fix _wait_target_ready() for hwmods without sysc
    ARM: dts: add CPU OPP and regulator supply property for exynos4210
    ARM: dts: Update video-phy node with syscon phandle for exynos3250
    ARM: DRA7: hwmod: fix gpmc hwmod

    Linus Torvalds
     

02 Aug, 2015

5 commits

  • Pull VFS fix from Al Viro:
    "Spurious ENOTDIR fix"

    This should fix the problems reported by Dominique Martinet and Hugh
    Dickins.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    link_path_walk(): be careful when failing with ENOTDIR

    Linus Torvalds
     
  • In RCU mode we might end up with dentry evicted just we check
    that it's a directory. In such case we should return ECHILD
    rather than ENOTDIR, so that pathwalk would be retries in non-RCU
    mode.

    Breakage had been introduced in commit b18825a - prior to that
    we were looking at nd->inode, which had been fetched before
    verifying that ->d_seq was still valid. That form of check
    would only be satisfied if at some point the pathname prefix
    would indeed have resolved to a non-directory. The fix consists
    of checking ->d_seq after we'd run into a non-directory dentry,
    and failing with ECHILD in case of mismatch.

    Note that all branches since 3.12 have that problem...

    Signed-off-by: Al Viro

    Al Viro
     
  • Pull dmaengine fixes from Vinod Koul:
    "We had a regression due to reuse of descriptor so we have reverted
    that.

    The rest are driver fixes:

    - at_hdmac and at_xdmac for residue, trannfer width, and channel config
    - pl330 final fix for dma fails and overflow issue
    - xgene resouce map fix
    - mv_xor big endian op fix"

    * tag 'dmaengine-fix-4.2-rc5' of git://git.infradead.org/users/vkoul/slave-dma:
    Revert "dmaengine: virt-dma: don't always free descriptor upon completion"
    dmaengine: mv_xor: fix big endian operation in register mode
    dmaengine: xgene-dma: Fix the resource map to handle overlapping
    dmaengine: at_xdmac: fix transfer data width in at_xdmac_prep_slave_sg()
    dmaengine: at_hdmac: fix residue computation
    dmaengine: at_xdmac: fix bug about channel configuration
    dmaengine: pl330: Really fix choppy sound because of wrong residue calculation
    dmaengine: pl330: Fix overflow when reporting residue in memcpy

    Linus Torvalds
     
  • Pull irq fixlets from Thomas Gleixner:
    "Just two updates to the maintainers file"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    MAINTAINERS: Appoint Jiang and Marc as irqdomain maintainers
    MAINTAINERS: Appoint Marc Zyngier as irqchips co-maintainer

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "Fallout from the recent NMI fixes: make x86 LDT handling more robust.

    Also some EFI fixes"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/ldt: Make modify_ldt synchronous
    x86/xen: Probe target addresses in set_aliased_prot() before the hypercall
    x86/irq: Use the caller provided polarity setting in mp_check_pin_attr()
    efi: Check for NULL efi kernel parameters
    x86/efi: Use all 64 bit of efi_memmap in setup_e820()

    Linus Torvalds
     

01 Aug, 2015

3 commits

  • If of_find_i2c_device_by_node() or of_find_i2c_adapter_by_node() find
    a device by node, but its type does not match, a reference to that
    device is still held. This change fixes the problem.

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Wolfram Sang

    Vladimir Zapolskiy
     
  • Pull networking fixes from David Miller:

    1) Must teardown SR-IOV before unregistering netdev in igb driver, from
    Alex Williamson.

    2) Fix ipv6 route unreachable crash in IPVS, from Alex Gartrell.

    3) Default route selection in ipv4 should take the prefix length, table
    ID, and TOS into account, from Julian Anastasov.

    4) sch_plug must have a reset method in order to purge all buffered
    packets when the qdisc is reset, likewise for sch_choke, from WANG
    Cong.

    5) Fix deadlock and races in slave_changelink/br_setport in bridging.
    From Nikolay Aleksandrov.

    6) mlx4 bug fixes (wrong index in port even propagation to VFs,
    overzealous BUG_ON assertion, etc.) from Ido Shamay, Jack
    Morgenstein, and Or Gerlitz.

    7) Turn off klog message about SCTP userspace interface compat that
    makes no sense at all, from Daniel Borkmann.

    8) Fix unbounded restarts of inet frag eviction process, causing NMI
    watchdog soft lockup messages, from Florian Westphal.

    9) Suspend/resume fixes for r8152 from Hayes Wang.

    10) Fix busy loop when MSG_WAITALL|MSG_PEEK is used in TCP recv, from
    Sabrina Dubroca.

    11) Fix performance regression when removing a lot of routes from the
    ipv4 routing tables, from Alexander Duyck.

    12) Fix device leak in AF_PACKET, from Lars Westerhoff.

    13) AF_PACKET also has a header length comparison bug due to signedness,
    from Alexander Drozdov.

    14) Fix bug in EBPF tail call generation on x86, from Daniel Borkmann.

    15) Memory leaks, TSO stats, watchdog timeout and other fixes to
    thunderx driver from Sunil Goutham and Thanneeru Srinivasulu.

    16) act_bpf can leak memory when replacing programs, from Daniel
    Borkmann.

    17) WOL packet fixes in gianfar driver, from Claudiu Manoil.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (79 commits)
    stmmac: fix missing MODULE_LICENSE in stmmac_platform
    gianfar: Enable device wakeup when appropriate
    gianfar: Fix suspend/resume for wol magic packet
    gianfar: Fix warning when CONFIG_PM off
    act_pedit: check binding before calling tcf_hash_release()
    net: sk_clone_lock() should only do get_net() if the parent is not a kernel socket
    net: sched: fix refcount imbalance in actions
    r8152: reset device when tx timeout
    r8152: add pre_reset and post_reset
    qlcnic: Fix corruption while copying
    act_bpf: fix memory leaks when replacing bpf programs
    net: thunderx: Fix for crash while BGX teardown
    net: thunderx: Add PCI driver shutdown routine
    net: thunderx: Fix crash when changing rss with mutliple traffic flows
    net: thunderx: Set watchdog timeout value
    net: thunderx: Wakeup TXQ only if CQE_TX are processed
    net: thunderx: Suppress alloc_pages() failure warnings
    net: thunderx: Fix TSO packet statistic
    net: thunderx: Fix memory leak when changing queue count
    net: thunderx: Fix RQ_DROP miscalculation
    ...

    Linus Torvalds
     
  • Pull btrfs fixes from Chris Mason:
    "Filipe fixed up a hard to trigger ENOSPC regression from our merge
    window pull, and we have a few other smaller fixes"

    * 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: fix quick exhaustion of the system array in the superblock
    btrfs: its btrfs_err() instead of btrfs_error()
    btrfs: Avoid NULL pointer dereference of free_extent_buffer when read_tree_block() fail
    btrfs: Fix lockdep warning of btrfs_run_delayed_iputs()

    Linus Torvalds