Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge linux 4.9.27 #1

Merged
merged 10,000 commits into from
May 10, 2017
Merged

Merge linux 4.9.27 #1

merged 10,000 commits into from
May 10, 2017
This pull request is big! We’re only showing the most recent 250 commits.

Commits on May 4, 2017

  1. IB/hfi1: Adjust default eager_buffer_size to 8MB

    Performance analysis shows benefits for PSM2 in increasing eager buffer
    size from 2MB to 8MB. The change has neutral impact on verbs.
    Make change to the module parameter's default value. Allocation
    ring down was verified to work with the larger buffer size.
    
    Reviewed-by: Tadeusz Struk <tadeusz.struk@intel.com>
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Tymoteusz Kielan <tymoteusz.kielan@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    Tymoteusz Kielan authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    9746fa4 View commit details
    Browse the repository at this point in the history
  2. IB/hfi1: Return an error on memory allocation failure

    If the eager buffer allocation fails, it is necessary to return
    an error code.
    
    Cc: stable@vger.kernel.org
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    9467906 View commit details
    Browse the repository at this point in the history
  3. IB/hfi1: Fix a subcontext memory leak

    The only context that frees user_exp_rcv data structures is the last
    context closed (from a sub-context set).  This leaks the allocations
    from the other sub-contexts.  Separate the common frees from the
    specific frees and call them at the appropriate time.
    
    Using KEDR to check for memory leaks we get:
    
    Before test:
    
    [leak_check] Possible leaks: 25
    
    After test:
    
    [leak_check] Possible leaks: 31  (6 leaked data structures)
    
    After patch applied (before and after test have the same value)
    
    [leak_check] Possible leaks: 25
    
    Each leak is 192 + 13440 + 6720 = 20352 bytes per sub-context.
    
    Cc: stable@vger.kernel.org
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    224d71f View commit details
    Browse the repository at this point in the history
  4. IB/hfi1: Name function prototype parameters

    To improve the readability of function prototypes, give the parameters
    names.
    
    Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    f4cd876 View commit details
    Browse the repository at this point in the history
  5. IB/hfi1: Use filedata rather than filepointer

    Since almost all functions that use the hfi1_filedata get the pointer
    from the file pointer, simplify by only passing the hfi1_filedata pointer.
    
    Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Reviewed-by: Ira Weiny <ira.weiny@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    5042cdd View commit details
    Browse the repository at this point in the history
  6. IB/hfi1: Remove atomic operations for SDMA_REQ_HAVE_AHG bit

    The AHG index is only accessed in the request call
    from user space, so there's no need for atomic semantics.
    Replace atomic operations for SDMA_REQ_HAVE_AHG bit
    with a test of the AHG index.
    
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    ssanchez11 authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    780a4c1 View commit details
    Browse the repository at this point in the history
  7. IB/hfi1: Search shared contexts on the opened device, not all devices

    The search for available shared contexts walks each registered hfi1
    device.  This search is too broad because other devices may not
    be on the same fabric, and using its contexts could cause unexpected
    behavior.
    
    Removed walking the list of devices, limiting the search to the opened
    device.  With the device walk removed, the hfi1_devdata (dd) is not
    available. Added it to the hfi1_filedata for reference.
    
    With this change, hfi1_count_units() was rendered obsolete and was
    removed.
    
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    5fbded4 View commit details
    Browse the repository at this point in the history
  8. IB/hfi1: Correctly clear the pkey

    In the close path the context is removed from the device array, and then
    the clear pkey function is called.  The pkey function trys to get the
    context from the device array, but because it was removed the clearing
    does not occur.
    
    Rework pkey clear function to work as expected.  Update the function
    variable to reflect the correct size and name of the hw_context.
    
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    637a9a7 View commit details
    Browse the repository at this point in the history
  9. IB/hfi1: Clean up context initialization

    Context initialization mixes base context init with sub context init.
    This is bad because contexts can be reused, and on reuse, reinit things
    that should not re-initialized.
    
    Normalize comments and function names to refer to base context and
    sub context (not main, shared or slaves).
    
    Separate the base context initialization from sub context initialization.
    
    hfi1_init_ctxt() cannot return an error so changed to a void and remove
    error message.
    
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    9b60d2c View commit details
    Browse the repository at this point in the history
  10. IB/hfi1: Fix an assign/ordering issue with shared context IDs

    The current algorithm for generating sub-context IDs is FILO.  If the
    contexts are not closed in that order, the uniqueness of the ID will be
    compromised. I.e. logging the creation/deletion of context IDs with an
    application that assigns and closes in a FIFO order reveals:
    
    cache_id: assign: uctxt: 3    sub_ctxt: 0
    cache_id: assign: uctxt: 3    sub_ctxt: 1
    cache_id: assign: uctxt: 3    sub_ctxt: 2
    cache_id: close:  uctxt: 3    sub_ctxt: 0
    cache_id: assign: uctxt: 3    sub_ctxt: 2 <<<
    
    The sub_ctxt ID 2 is reused incorrectly.
    
    Update the sub-context ID assign algorithm to use a bitmask of in_use
    contexts.  The new algorithm will allow the contexts to be closed in any
    order, and will only re-use unused contexts.
    
    Size subctxt and subctxt_cnt to match the user API size.
    
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    8737ce9 View commit details
    Browse the repository at this point in the history
  11. IB/hfi1: Clean up on context initialization failure

    The error path for context initialization is not consistent. Cleanup all
    resources on failure.
    
    Removed unused variable user_event_mask.
    
    Add the _BASE_FAILED bit to the event flags so that a base context can
    notify waiting sub contexts that they cannot continue.
    
    Running out of sub contexts is an EBUSY result, not EINVAL.
    
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    mjruhl authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    62239fc View commit details
    Browse the repository at this point in the history
  12. IB/rxe: Update caller's CRC for RXE_MEM_TYPE_DMA memory type

    Callers of rxe_mem_copy() provide pointer to store updated CRC
    value. That pointer was supposed to be updated, but the
    commit cee2688 ("IB/rxe: Offload CRC calculation when possible")
    mistakenly removed that assignment for RXE_MEM_TYPE_DMA memory type.
    
    The code worked because there are no actual callers with
    RXE_MEM_TYPE_DMA, who are interested in returned value of crcp.
    The one caller in read_reply(), who uses the returned crcp didn't
    set RXE_MEM_TYPE_DMA as mem->type.
    
    Fixes: cee2688 ("IB/rxe: Offload CRC calculation when possible")
    Reported-by: Andrew Boyer <andrew.boyer@dell.com>
    Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
    Acked-by: Moni Shoua <monis@mellanox.com>
    Reviewed-by: Andrew Boyer <andrew.boyer@dell.com>
    Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    Leon Romanovsky authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    af5df5f View commit details
    Browse the repository at this point in the history
  13. rxe: expose num_possible_cpus() cnum_comp_vectors

    They're completely logical, so don't impose an artificial limitation.
    
    Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
    Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
    Acked-by: Moni Shoua <monis@mellanox.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    sagigrimberg authored and dledford committed May 4, 2017
    Configuration menu
    Copy the full SHA
    67cf362 View commit details
    Browse the repository at this point in the history
  14. Make stat/lstat/fstatat pass AT_NO_AUTOMOUNT to vfs_statx()

    stat/lstat/fstatat need to pass AT_NO_AUTOMOUNT to vfs_statx() as the
    pre-statx code didn't set LOOKUP_AUTOMOUNT, even though fstatat() accepted
    the AT_NO_AUTOMOUNT flag.
    
    Fixes: a528d35 ("statx: Add a system call to make enhanced file info available")
    Reported-by: Ian Kent <raven@themaw.net>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Tested-by: Ian Kent <raven@themaw.net>
    cc: stable@vger.kernel.org
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    dhowells authored and Al Viro committed May 4, 2017
    Configuration menu
    Copy the full SHA
    deccf49 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2017

  1. Merge tag 'usb-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/usb
    
    Pull USB updates from Greg KH:
     "Here is the big USB patchset for 4.12-rc1.
    
      Lots of good stuff here, after many many many attempts, the kernel
      finally has a working typeC interface, many thanks to Heikki and
      Guenter and others who have taken the time to get this merged. It
      wasn't an easy path for them at all.
    
      There's also a staging driver that uses this new api, which is why
      it's coming in through this tree.
    
      Along with that, there's the usual huge number of changes for gadget
      drivers, xhci, and other stuff. Johan also finally refactored pretty
      much every driver that was looking at USB endpoints to do it in a
      common way, which will help prevent any "badly-formed" devices from
      causing problems in drivers. That too wasn't a simple task.
    
      All of these have been in linux-next for a while with no reported
      issues"
    
    * tag 'usb-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits)
      staging: typec: Fairchild FUSB302 Type-c chip driver
      staging: typec: Type-C Port Controller Interface driver (tcpci)
      staging: typec: USB Type-C Port Manager (tcpm)
      usb: host: xhci: remove #ifdef around PM functions
      usb: musb: don't mark of_dev_auxdata as initdata
      usb: misc: legousbtower: Fix buffers on stack
      USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications"
      usb: Make sure usb/phy/of gets built-in
      USB: storage: e-mail update in drivers/usb/storage/unusual_devs.h
      usb: host: xhci: print correct command ring address
      usb: host: xhci: delete sp_dma_buffers for scratchpad
      usb: host: xhci: using correct specification chapter reference for DCBAAP
      xhci: switch to pci_alloc_irq_vectors
      usb: host: xhci-plat: set resume_quirk() for R-Car controllers
      usb: host: xhci-plat: add resume_quirk()
      usb: host: xhci-plat: enable clk in resume timing
      usb: host: plat: Enable xHCI plat runtime PM
      USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit
      USB: serial: constify static arrays
      usb: fix some references for /proc/bus/usb
      ...
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    8f28472 View commit details
    Browse the repository at this point in the history
  2. Merge tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/gregkh/driver-core
    
    Pull driver core updates from Greg KH:
     "Very tiny pull request for 4.12-rc1 for the driver core this time
      around.
    
      There are some documentation fixes, an eventpoll.h fixup to make it
      easier for the libc developers to take our header files directly, and
      some very minor driver core fixes and changes.
    
      All have been in linux-next for a very long time with no reported
      issues"
    
    * tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
      Revert "kref: double kref_put() in my_data_handler()"
      driver core: don't initialize 'parent' in device_add()
      drivers: base: dma-mapping: use nth_page helper
      Documentation/ABI: add information about cpu_capacity
      debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE
      eventpoll.h: add missing epoll event masks
      eventpoll.h: fix epoll event masks
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    0be7517 View commit details
    Browse the repository at this point in the history
  3. Merge tag 'drm/tegra/for-4.12-rc1' of git://anongit.freedesktop.org/t…

    …egra/linux into drm-next
    
    drm/tegra: Changes for v4.12-rc1
    
    This contains various fixes to the host1x driver as well as a plug for a
    leak of kernel pointers to userspace.
    
    A fairly big addition this time around is the Video Image Composer (VIC)
    support that can be used to accelerate some 2D and image compositing
    operations.
    
    Furthermore the driver now supports FB modifiers, so we no longer rely
    on a custom IOCTL to set those.
    
    Finally this contains a few preparatory patches for Tegra186 support
    which unfortunately didn't quite make it this time, but will hopefully
    be ready for v4.13.
    
    * tag 'drm/tegra/for-4.12-rc1' of git://anongit.freedesktop.org/tegra/linux:
      gpu: host1x: Fix host1x driver shutdown
      gpu: host1x: Support module reset
      gpu: host1x: Sort includes alphabetically
      drm/tegra: Add VIC support
      dt-bindings: Add bindings for the Tegra VIC
      drm/tegra: Add falcon helper library
      drm/tegra: Add Tegra DRM allocation API
      drm/tegra: Add tiling FB modifiers
      drm/tegra: Don't leak kernel pointer to userspace
      drm/tegra: Protect IOMMU operations by mutex
      drm/tegra: Enable IOVA API when IOMMU support is enabled
      gpu: host1x: Add IOMMU support
      gpu: host1x: Fix potential out-of-bounds access
      iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m
      iommu: Add dummy implementations for !IOMMU_IOVA
      MAINTAINERS: Add related headers to IOMMU section
      iommu/iova: Consolidate code for adding new node to iovad domain rbtree
    airlied committed May 5, 2017
    Configuration menu
    Copy the full SHA
    644b493 View commit details
    Browse the repository at this point in the history
  4. drm: Document code of conduct

    freedesktop.org has adopted a formal&enforced code of conduct:
    
    https://www.fooishbar.org/blog/fdo-contributor-covenant/
    https://www.freedesktop.org/wiki/CodeOfConduct/
    
    Besides formalizing things a bit more I don't think this changes
    anything for us, we've already peer-enforced respectful and
    constructive interactions since a long time. But it's good to document
    things properly.
    
    v2: Drop confusing note from commit message and clarify the grammer
    (Chris, Alex and others).
    
    Cc: Daniel Stone <daniels@collabora.com>
    Cc: Keith Packard <keithp@keithp.com>
    Cc: tfheen@err.no
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
    Acked-by: Archit Taneja <architt@codeaurora.org>
    Reviewed-by: Martin Peres <martin.peres@free.fr>
    Acked-by: Thierry Reding <treding@nvidia.com>
    Acked-by: Jani Nikula <jani.nikula@intel.com>
    Acked-by: Vincent Abriou <vincent.abriou@st.com>
    Acked-by: Neil Armstrong <narmstrong@baylibre.com>
    Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Acked-by: Brian Starkey <brian.starkey@arm.com>
    Acked-by: Rob Clark <robdclark@gmail.com>
    Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
    Acked-by: Sean Paul <seanpaul@chromium.org>
    Reviewed-by: Harry Wentland <harry.wentland@amd.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
    Acked-by: Gustavo Padovan <gustavo.padovan@collabora.com>
    Acked-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
    Acked-by: Keith Packard <keithp@keithp.com>
    Acked-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
    Acked-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    danvet authored and airlied committed May 5, 2017
    Configuration menu
    Copy the full SHA
    8676df5 View commit details
    Browse the repository at this point in the history
  5. Merge tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/gregkh/char-misc
    
    Pull char/misc driver updates from Greg KH:
     "Here is the big set of new char/misc driver drivers and features for
      4.12-rc1.
    
      There's lots of new drivers added this time around, new firmware
      drivers from Google, more auxdisplay drivers, extcon drivers, fpga
      drivers, and a bunch of other driver updates. Nothing major, except if
      you happen to have the hardware for these drivers, and then you will
      be happy :)
    
      All of these have been in linux-next for a while with no reported
      issues"
    
    * tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (136 commits)
      firmware: google memconsole: Fix return value check in platform_memconsole_init()
      firmware: Google VPD: Fix return value check in vpd_platform_init()
      goldfish_pipe: fix build warning about using too much stack.
      goldfish_pipe: An implementation of more parallel pipe
      fpga fr br: update supported version numbers
      fpga: region: release FPGA region reference in error path
      fpga altera-hps2fpga: disable/unprepare clock on error in alt_fpga_bridge_probe()
      mei: drop the TODO from samples
      firmware: Google VPD sysfs driver
      firmware: Google VPD: import lib_vpd source files
      misc: lkdtm: Add volatile to intentional NULL pointer reference
      eeprom: idt_89hpesx: Add OF device ID table
      misc: ds1682: Add OF device ID table
      misc: tsl2550: Add OF device ID table
      w1: Remove unneeded use of assert() and remove w1_log.h
      w1: Use kernel common min() implementation
      uio_mf624: Align memory regions to page size and set correct offsets
      uio_mf624: Refactor memory info initialization
      uio: Allow handling of non page-aligned memory regions
      hangcheck-timer: Fix typo in comment
      ...
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    af82455 View commit details
    Browse the repository at this point in the history
  6. libnvdimm, pfn: fix 'npfns' vs section alignment

    Fix failures to create namespaces due to the vmem_altmap not advertising
    enough free space to store the memmap.
    
     WARNING: CPU: 15 PID: 8022 at arch/x86/mm/init_64.c:656 arch_add_memory+0xde/0xf0
     [..]
     Call Trace:
      dump_stack+0x63/0x83
      __warn+0xcb/0xf0
      warn_slowpath_null+0x1d/0x20
      arch_add_memory+0xde/0xf0
      devm_memremap_pages+0x244/0x440
      pmem_attach_disk+0x37e/0x490 [nd_pmem]
      nd_pmem_probe+0x7e/0xa0 [nd_pmem]
      nvdimm_bus_probe+0x71/0x120 [libnvdimm]
      driver_probe_device+0x2bb/0x460
      bind_store+0x114/0x160
      drv_attr_store+0x25/0x30
    
    In commit 658922e "libnvdimm, pfn: fix memmap reservation sizing"
    we arranged for the capacity to be allocated, but failed to also update
    the 'npfns' parameter. This leads to cases where there is enough
    capacity reserved to hold all the allocated sections, but
    vmemmap_populate_hugepages() still encounters -ENOMEM from
    altmap_alloc_block_buf().
    
    This fix is a stop-gap until we can teach the core memory hotplug
    implementation to permit sub-section hotplug.
    
    Cc: <stable@vger.kernel.org>
    Fixes: 658922e ("libnvdimm, pfn: fix memmap reservation sizing")
    Reported-by: Anisha Allada <anisha.allada@intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    djbw committed May 5, 2017
    Configuration menu
    Copy the full SHA
    d5483fe View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7361636 View commit details
    Browse the repository at this point in the history
  8. initramfs: Always do fput() and load modules after rootfs populate

    In OpenRISC we do not have a bootloader passed initrd, but the built in
    initramfs does contain the /init and other binaries, including modules.
    The previous commit 0886551 ("initramfs: finish fput() before
    accessing any binary from initramfs") made a change to only call fput()
    if the bootloader initrd was available, this caused intermittent crashes
    for OpenRISC.
    
    This patch changes the fput() to happen unconditionally if any rootfs is
    loaded. Also, I added some comments to make it a bit more clear why we
    call unpack_to_rootfs() multiple times.
    
    Fixes: 0886551 ("initramfs: finish fput() before accessing any binary from initramfs")
    Cc: stable@vger.kernel.org
    Cc: Lokesh Vutla <lokeshvutla@ti.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Acked-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Stafford Horne <shorne@gmail.com>
    stffrdhrn committed May 5, 2017
    Configuration menu
    Copy the full SHA
    17a9be3 View commit details
    Browse the repository at this point in the history
  9. kvm: nVMX: Don't validate disabled secondary controls

    According to the SDM, if the "activate secondary controls" primary
    processor-based VM-execution control is 0, no checks are performed on
    the secondary processor-based VM-execution controls.
    
    Signed-off-by: Jim Mattson <jmattson@google.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    jsmattsonjr authored and bonzini committed May 5, 2017
    Configuration menu
    Copy the full SHA
    2e5b0bd View commit details
    Browse the repository at this point in the history
  10. befs: make export work with cold dcache

    based on commit b3b42c0
    ("fs/affs: make export work with cold dcache")
    
    This adds get_parent function so that nfs client can still work after
    cache drop (Tested on NFS v4 with echo 3 > /proc/sys/vm/drop_caches)
    
    Signed-off-by: Fabian Frederick <fabf@skynet.be>
    Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
    Fabian Frederick authored and luisbg committed May 5, 2017
    Configuration menu
    Copy the full SHA
    dcfd9b2 View commit details
    Browse the repository at this point in the history
  11. arm64: Fix the DMA mmap and get_sgtable API with DMA_ATTR_FORCE_CONTI…

    …GUOUS
    
    While honouring the DMA_ATTR_FORCE_CONTIGUOUS on arm64 (commit
    44176bb: "arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to
    IOMMU"), the existing uses of dma_mmap_attrs() and dma_get_sgtable()
    have been broken by passing a physically contiguous vm_struct with an
    invalid pages pointer through the common iommu API.
    
    Since the coherent allocation with DMA_ATTR_FORCE_CONTIGUOUS uses CMA,
    this patch simply reuses the existing swiotlb logic for mmap and
    get_sgtable.
    
    Note that the current implementation of get_sgtable (both swiotlb and
    iommu) is broken if dma_declare_coherent_memory() is used since such
    memory does not have a corresponding struct page. To be addressed in a
    subsequent patch.
    
    Fixes: 44176bb ("arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU")
    Reported-by: Andrzej Hajda <a.hajda@samsung.com>
    Cc: Geert Uytterhoeven <geert+renesas@glider.be>
    Acked-by: Robin Murphy <robin.murphy@arm.com>
    Tested-by: Andrzej Hajda <a.hajda@samsung.com>
    Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
    Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    ctmarinas committed May 5, 2017
    Configuration menu
    Copy the full SHA
    92f66f8 View commit details
    Browse the repository at this point in the history
  12. CIFS: add misssing SFM mapping for doublequote

    SFM is mapping doublequote to 0xF020
    
    Without this patch creating files with doublequote fails to Windows/Mac
    
    Signed-off-by: Bjoern Jacke <bjacke@samba.org>
    Signed-off-by: Steve French <smfrench@gmail.com>
    CC: stable <stable@vger.kernel.org>
    Björn Jacke authored and smfrench committed May 5, 2017
    Configuration menu
    Copy the full SHA
    85435d7 View commit details
    Browse the repository at this point in the history
  13. bridge: netlink: account for IFLA_BRPORT_{B, M}CAST_FLOOD size and po…

    …licy
    
    The attribute sizes for IFLA_BRPORT_MCAST_FLOOD and
    IFLA_BRPORT_BCAST_FLOOD weren't accounted for in br_port_info_size()
    when they were added. Do so now and also add the corresponding policy
    entries:
    
    Cc: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Cc: Mike Manning <mmanning@brocade.com>
    Fixes: b6cb5ac ("net: bridge: add per-port multicast flood flag")
    Fixes: 99f906e ("bridge: add per-port broadcast flood flag")
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    tklauser authored and davem330 committed May 5, 2017
    Configuration menu
    Copy the full SHA
    9051247 View commit details
    Browse the repository at this point in the history
  14. tcp: randomize timestamps on syncookies

    Whole point of randomization was to hide server uptime, but an attacker
    can simply start a syn flood and TCP generates 'old style' timestamps,
    directly revealing server jiffies value.
    
    Also, TSval sent by the server to a particular remote address vary
    depending on syncookies being sent or not, potentially triggering PAWS
    drops for innocent clients.
    
    Lets implement proper randomization, including for SYNcookies.
    
    Also we do not need to export sysctl_tcp_timestamps, since it is not
    used from a module.
    
    In v2, I added Florian feedback and contribution, adding tsoff to
    tcp_get_cookie_sock().
    
    v3 removed one unused variable in tcp_v4_connect() as Florian spotted.
    
    Fixes: 95a22ca ("tcp: randomize tcp timestamp offsets for each connection")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: Florian Westphal <fw@strlen.de>
    Tested-by: Florian Westphal <fw@strlen.de>
    Cc: Yuchung Cheng <ycheng@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Eric Dumazet authored and davem330 committed May 5, 2017
    Configuration menu
    Copy the full SHA
    84b114b View commit details
    Browse the repository at this point in the history
  15. Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/ebiederm/user-namespace
    
    Pull namespace updates from Eric Biederman:
     "This is a set of small fixes that were mostly stumbled over during
      more significant development. This proc fix and the fix to
      posix-timers are the most significant of the lot.
    
      There is a lot of good development going on but unfortunately it
      didn't quite make the merge window"
    
    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
      proc: Fix unbalanced hard link numbers
      signal: Make kill_proc_info static
      rlimit: Properly call security_task_setrlimit
      signal: Remove unused definition of sig_user_definied
      ia64: Remove unused IA64_TASK_SIGHAND_OFFSET and IA64_SIGHAND_SIGLOCK_OFFSET
      ipc: Remove unused declaration of recompute_msgmni
      posix-timers: Correct sanity check in posix_cpu_nsleep
      sysctl: Remove dead register_sysctl_root
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    e579dde View commit details
    Browse the repository at this point in the history
  16. Merge tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/powerpc/linux
    
    Pull powerpc updates from Michael Ellerman:
     "Highlights include:
    
       - Larger virtual address space on 64-bit server CPUs. By default we
         use a 128TB virtual address space, but a process can request access
         to the full 512TB by passing a hint to mmap().
    
       - Support for the new Power9 "XIVE" interrupt controller.
    
       - TLB flushing optimisations for the radix MMU on Power9.
    
       - Support for CAPI cards on Power9, using the "Coherent Accelerator
         Interface Architecture 2.0".
    
       - The ability to configure the mmap randomisation limits at build and
         runtime.
    
       - Several small fixes and cleanups to the kprobes code, as well as
         support for KPROBES_ON_FTRACE.
    
       - Major improvements to handling of system reset interrupts,
         correctly treating them as NMIs, giving them a dedicated stack and
         using a new hypervisor call to trigger them, all of which should
         aid debugging and robustness.
    
       - Many fixes and other minor enhancements.
    
      Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Alistair Popple,
      Andrew Donnellan, Aneesh Kumar K.V, Anshuman Khandual, Anton
      Blanchard, Balbir Singh, Ben Hutchings, Benjamin Herrenschmidt,
      Bhupesh Sharma, Chris Packham, Christian Zigotzky, Christophe Leroy,
      Christophe Lombard, Daniel Axtens, David Gibson, Gautham R. Shenoy,
      Gavin Shan, Geert Uytterhoeven, Guilherme G. Piccoli, Hamish Martin,
      Hari Bathini, Kees Cook, Laurent Dufour, Madhavan Srinivasan, Mahesh J
      Salgaonkar, Mahesh Salgaonkar, Masami Hiramatsu, Matt Brown, Matthew
      R. Ochs, Michael Neuling, Naveen N. Rao, Nicholas Piggin, Oliver
      O'Halloran, Pan Xinhui, Paul Mackerras, Rashmica Gupta, Russell
      Currey, Sukadev Bhattiprolu, Thadeu Lima de Souza Cascardo, Tobin C.
      Harding, Tyrel Datwyler, Uma Krishnan, Vaibhav Jain, Vipin K Parashar,
      Yang Shi"
    
    * tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (214 commits)
      powerpc/64s: Power9 has no LPCR[VRMASD] field so don't set it
      powerpc/powernv: Fix TCE kill on NVLink2
      powerpc/mm/radix: Drop support for CPUs without lockless tlbie
      powerpc/book3s/mce: Move add_taint() later in virtual mode
      powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body
      powerpc/smp: Document irq enable/disable after migrating IRQs
      powerpc/mpc52xx: Don't select user-visible RTAS_PROC
      powerpc/powernv: Document cxl dependency on special case in pnv_eeh_reset()
      powerpc/eeh: Clean up and document event handling functions
      powerpc/eeh: Avoid use after free in eeh_handle_special_event()
      cxl: Mask slice error interrupts after first occurrence
      cxl: Route eeh events to all drivers in cxl_pci_error_detected()
      cxl: Force context lock during EEH flow
      powerpc/64: Allow CONFIG_RELOCATABLE if COMPILE_TEST
      powerpc/xmon: Teach xmon oops about radix vectors
      powerpc/mm/hash: Fix off-by-one in comment about kernel contexts ids
      powerpc/pseries: Enable VFIO
      powerpc/powernv: Fix iommu table size calculation hook for small tables
      powerpc/powernv: Check kzalloc() return value in pnv_pci_table_alloc
      powerpc: Add arch/powerpc/tools directory
      ...
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    7246f60 View commit details
    Browse the repository at this point in the history
  17. dm cache metadata: fail operations if fail_io mode has been established

    Otherwise it is possible to trigger crashes due to the metadata being
    inaccessible yet these methods don't safely account for that possibility
    without these checks.
    
    Cc: stable@vger.kernel.org
    Reported-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    snitm committed May 5, 2017
    Configuration menu
    Copy the full SHA
    10add84 View commit details
    Browse the repository at this point in the history
  18. net: alx: handle pci_alloc_irq_vectors return correctly

    It was introduced while switching to pci_alloc_irq_vectors recently
    and fixes:
    
    [   60.527052] alx 0000:03:00.0 enp3s0: Enabling MSI-X interrupts failed!
    [   60.529323] BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8
    [   60.531589] IP: alx_alloc_napis+0xe6/0x1e0 [alx]
    [   60.533831] PGD 0
    [   60.533833] P4D 0
    
    [   60.540559] Oops: 0002 [#1] SMP
    [   60.542759] Modules linked in: ebtables ip6table_filter ip6_tables.....
    [   60.549990]  drm_kms_helper drm crc32c_intel alx serio_raw mdio wmi video i2c_hid uas usb_storage
    [   60.551404] CPU: 0 PID: 999 Comm: NetworkManager Not tainted 4.11.0+ #1
    [   60.552813] Hardware name: Acer Predator G9-591/Mustang_SLS, BIOS V1.10 03/03/2016
    [   60.554219] task: ffff8804ae833c00 task.stack: ffffc90003eec000
    [   60.555383] RIP: 0010:alx_alloc_napis+0xe6/0x1e0 [alx]
    [   60.556615] RSP: 0018:ffffc90003eef660 EFLAGS: 00010286
    [   60.557787] RAX: ffff8804962835a0 RBX: ffff8804aee8a8c0 RCX: 0000000000000000
    [   60.558987] RDX: 0000000000000060 RSI: 0000000000000000 RDI: ffff880496283600
    [   60.559979] RBP: ffffc90003eef688 R08: ffff8804c1c1e7e0 R09: ffff8804962835a0
    [   60.560978] R10: ffff8804962835a0 R11: 0000000000000102 R12: 0000000000000000
    [   60.561974] R13: 0000000000000000 R14: ffff8804aee8aaf0 R15: ffffffffa0052ea0
    [   60.562974] FS:  00007f1cecbc9940(0000) GS:ffff8804c1c00000(0000) knlGS:0000000000000000
    [   60.564003] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   60.564884] CR2: 00000000000000b8 CR3: 0000000496025000 CR4: 00000000003406f0
    [   60.565782] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [   60.566676] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [   60.567560] Call Trace:
    [   60.568500]  __alx_open+0xa2/0x570 [alx]
    [   60.569355]  ? notifier_call_chain+0x4a/0x70
    [   60.570144]  alx_open+0x17/0x20 [alx]
    [   60.570909]  __dev_open+0xc6/0x140
    [   60.571682]  ? _raw_spin_unlock_bh+0x1a/0x20
    [   60.572469]  __dev_change_flags+0x9d/0x160
    [   60.573252]  dev_change_flags+0x29/0x60
    [   60.574070]  do_setlink+0x32e/0xc90
    [   60.574815]  ? ttwu_do_activate+0x77/0x80
    [   60.575544]  ? drm_fb_helper_dirty.isra.17+0xc7/0xe0 [drm_kms_helper]
    [   60.576273]  ? drm_fb_helper_cfb_imageblit+0x30/0x40 [drm_kms_helper]
    [   60.577004]  ? bit_putcs+0x2f7/0x560
    [   60.577729]  ? nla_parse+0x35/0x140
    [   60.578518]  rtnl_newlink+0x7d3/0x900
    [   60.579280]  ? security_capset+0x30/0x80
    [   60.580029]  ? ns_capable_common+0x68/0x80
    [   60.580747]  ? ns_capable+0x13/0x20
    [   60.581453]  rtnetlink_rcv_msg+0xee/0x220
    [   60.582198]  ? rtnl_newlink+0x900/0x900
    [   60.582909]  netlink_rcv_skb+0xe7/0x120
    [   60.583601]  rtnetlink_rcv+0x28/0x30
    [   60.584303]  netlink_unicast+0x18c/0x220
    [   60.585002]  netlink_sendmsg+0x2ba/0x3b0
    [   60.585703]  sock_sendmsg+0x38/0x50
    [   60.586436]  ___sys_sendmsg+0x2b6/0x2d0
    [   60.587123]  ? lockref_put_or_lock+0x5e/0x80
    [   60.587822]  ? dput+0x155/0x1d0
    [   60.588518]  ? mntput+0x24/0x40
    [   60.589215]  __sys_sendmsg+0x54/0x90
    [   60.589907]  ? __sys_sendmsg+0x54/0x90
    [   60.590627]  SyS_sendmsg+0x12/0x20
    [   60.591333]  entry_SYSCALL_64_fastpath+0x1a/0xa5
    [   60.592021] RIP: 0033:0x7f1ceb44e3b0
    [   60.592697] RSP: 002b:00007fffd7f0a2d0 EFLAGS: 00000293 ORIG_RAX: 000000000000002e
    [   60.593385] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1ceb44e3b0
    [   60.594107] RDX: 0000000000000000 RSI: 00007fffd7f0a380 RDI: 000000000000000c
    [   60.594798] RBP: 00007fffd7f0a800 R08: 0000000000000000 R09: 0000000000000000
    [   60.595502] R10: 0000564ffbae6e20 R11: 0000000000000293 R12: 0000000000000001
    [   60.596200] R13: 0000000000000002 R14: 0000000000000010 R15: 00007fffd7f0a4d0
    [   60.596899] Code: ed 85 c9 0f 8f ec 00 00 00 48 8b 3d 9d 97 1a e2 ba 50 00 00 00 be c0 80 40 01 4c 8b a3 30 02 00 00 e8 ff e5 1d e1 48 85 c0 74 a3 <49> 89 84 24 b8 00 00 00 48 8b 93 30 02 00 00 48 8b 4b 08 48 89
    [   60.597642] RIP: alx_alloc_napis+0xe6/0x1e0 [alx] RSP: ffffc90003eef660
    [   60.598427] CR2: 00000000000000b8
    
    Fixes: f3297f6 ("net: alx: switch to pci_alloc_irq_vectors")
    Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    rakeshpandit authored and davem330 committed May 5, 2017
    Configuration menu
    Copy the full SHA
    2c041af View commit details
    Browse the repository at this point in the history
  19. ARC: mm: fix build failure in linux-next for UP builds

    kisskb build service reported ARC defconfig build failures in linux-next
    
    | arch/arc/include/asm/mmu.h:75:21: error: 'NR_CPUS' undeclared here (not in a function)
    | make[3]: *** [arch/arc/mm/ioremap.o] Error 1
    | make[2]: *** [arch/arc/mm] Error 2
    | make[1]: *** [arch/arc] Error 2
    
    which I bisected to a subtle side-effect of a totally benign mm patch
    ("mm, vmalloc: properly track vmalloc users") which caused a header
    include chain deviation - asm/mmu.h using NR_CPUS before including
    linux/threads.h
    
    Fix that by adding the dependnet header and while it at fix a related
    header to include linux headers aheads of asm headers as sometimes that
    slso triggers such issues !
    
    Reported-by: noreply@ellerman.id.au
    Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
    vineetgarc committed May 5, 2017
    Configuration menu
    Copy the full SHA
    868a653 View commit details
    Browse the repository at this point in the history
  20. Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/arm64/linux
    
    Pull arm64 updates from Catalin Marinas:
    
     - kdump support, including two necessary memblock additions:
       memblock_clear_nomap() and memblock_cap_memory_range()
    
     - ARMv8.3 HWCAP bits for JavaScript conversion instructions, complex
       numbers and weaker release consistency
    
     - arm64 ACPI platform MSI support
    
     - arm perf updates: ACPI PMU support, L3 cache PMU in some Qualcomm
       SoCs, Cortex-A53 L2 cache events and DTLB refills, MAINTAINERS update
       for DT perf bindings
    
     - architected timer errata framework (the arch/arm64 changes only)
    
     - support for DMA_ATTR_FORCE_CONTIGUOUS in the arm64 iommu DMA API
    
     - arm64 KVM refactoring to use common system register definitions
    
     - remove support for ASID-tagged VIVT I-cache (no ARMv8 implementation
       using it and deprecated in the architecture) together with some
       I-cache handling clean-up
    
     - PE/COFF EFI header clean-up/hardening
    
     - define BUG() instruction without CONFIG_BUG
    
    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (92 commits)
      arm64: Fix the DMA mmap and get_sgtable API with DMA_ATTR_FORCE_CONTIGUOUS
      arm64: Print DT machine model in setup_machine_fdt()
      arm64: pmu: Wire-up Cortex A53 L2 cache events and DTLB refills
      arm64: module: split core and init PLT sections
      arm64: pmuv3: handle pmuv3+
      arm64: Add CNTFRQ_EL0 trap handler
      arm64: Silence spurious kbuild warning on menuconfig
      arm64: pmuv3: use arm_pmu ACPI framework
      arm64: pmuv3: handle !PMUv3 when probing
      drivers/perf: arm_pmu: add ACPI framework
      arm64: add function to get a cpu's MADT GICC table
      drivers/perf: arm_pmu: split out platform device probe logic
      drivers/perf: arm_pmu: move irq request/free into probe
      drivers/perf: arm_pmu: split cpu-local irq request/free
      drivers/perf: arm_pmu: rename irq request/free functions
      drivers/perf: arm_pmu: handle no platform_device
      drivers/perf: arm_pmu: simplify cpu_pmu_request_irqs()
      drivers/perf: arm_pmu: factor out pmu registration
      drivers/perf: arm_pmu: fold init into alloc
      drivers/perf: arm_pmu: define armpmu_init_fn
      ...
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    ab182e6 View commit details
    Browse the repository at this point in the history
  21. xfs: fix use-after-free in xfs_finish_page_writeback

    Commit 28b783e ("xfs: bufferhead chains are invalid after
    end_page_writeback") fixed one use-after-free issue by
    pre-calculating the loop conditionals before calling bh->b_end_io()
    in the end_io processing loop, but it assigned 'next' pointer before
    checking end offset boundary & breaking the loop, at which point the
    bh might be freed already, and caused use-after-free.
    
    This is caught by KASAN when running fstests generic/127 on sub-page
    block size XFS.
    
    [ 2517.244502] run fstests generic/127 at 2017-04-27 07:30:50
    [ 2747.868840] ==================================================================
    [ 2747.876949] BUG: KASAN: use-after-free in xfs_destroy_ioend+0x3d3/0x4e0 [xfs] at addr ffff8801395ae698
    ...
    [ 2747.918245] Call Trace:
    [ 2747.920975]  dump_stack+0x63/0x84
    [ 2747.924673]  kasan_object_err+0x21/0x70
    [ 2747.928950]  kasan_report+0x271/0x530
    [ 2747.933064]  ? xfs_destroy_ioend+0x3d3/0x4e0 [xfs]
    [ 2747.938409]  ? end_page_writeback+0xce/0x110
    [ 2747.943171]  __asan_report_load8_noabort+0x19/0x20
    [ 2747.948545]  xfs_destroy_ioend+0x3d3/0x4e0 [xfs]
    [ 2747.953724]  xfs_end_io+0x1af/0x2b0 [xfs]
    [ 2747.958197]  process_one_work+0x5ff/0x1000
    [ 2747.962766]  worker_thread+0xe4/0x10e0
    [ 2747.966946]  kthread+0x2d3/0x3d0
    [ 2747.970546]  ? process_one_work+0x1000/0x1000
    [ 2747.975405]  ? kthread_create_on_node+0xc0/0xc0
    [ 2747.980457]  ? syscall_return_slowpath+0xe6/0x140
    [ 2747.985706]  ? do_page_fault+0x30/0x80
    [ 2747.989887]  ret_from_fork+0x2c/0x40
    [ 2747.993874] Object at ffff8801395ae690, in cache buffer_head size: 104
    [ 2748.001155] Allocated:
    [ 2748.003782] PID = 8327
    [ 2748.006411]  save_stack_trace+0x1b/0x20
    [ 2748.010688]  save_stack+0x46/0xd0
    [ 2748.014383]  kasan_kmalloc+0xad/0xe0
    [ 2748.018370]  kasan_slab_alloc+0x12/0x20
    [ 2748.022648]  kmem_cache_alloc+0xb8/0x1b0
    [ 2748.027024]  alloc_buffer_head+0x22/0xc0
    [ 2748.031399]  alloc_page_buffers+0xd1/0x250
    [ 2748.035968]  create_empty_buffers+0x30/0x410
    [ 2748.040730]  create_page_buffers+0x120/0x1b0
    [ 2748.045493]  __block_write_begin_int+0x17a/0x1800
    [ 2748.050740]  iomap_write_begin+0x100/0x2f0
    [ 2748.055308]  iomap_zero_range_actor+0x253/0x5c0
    [ 2748.060362]  iomap_apply+0x157/0x270
    [ 2748.064347]  iomap_zero_range+0x5a/0x80
    [ 2748.068624]  iomap_truncate_page+0x6b/0xa0
    [ 2748.073227]  xfs_setattr_size+0x1f7/0xa10 [xfs]
    [ 2748.078312]  xfs_vn_setattr_size+0x68/0x140 [xfs]
    [ 2748.083589]  xfs_file_fallocate+0x4ac/0x820 [xfs]
    [ 2748.088838]  vfs_fallocate+0x2cf/0x780
    [ 2748.093021]  SyS_fallocate+0x48/0x80
    [ 2748.097006]  do_syscall_64+0x18a/0x430
    [ 2748.101186]  return_from_SYSCALL_64+0x0/0x6a
    [ 2748.105948] Freed:
    [ 2748.108189] PID = 8327
    [ 2748.110816]  save_stack_trace+0x1b/0x20
    [ 2748.115093]  save_stack+0x46/0xd0
    [ 2748.118788]  kasan_slab_free+0x73/0xc0
    [ 2748.122969]  kmem_cache_free+0x7a/0x200
    [ 2748.127247]  free_buffer_head+0x41/0x80
    [ 2748.131524]  try_to_free_buffers+0x178/0x250
    [ 2748.136316]  xfs_vm_releasepage+0x2e9/0x3d0 [xfs]
    [ 2748.141563]  try_to_release_page+0x100/0x180
    [ 2748.146325]  invalidate_inode_pages2_range+0x7da/0xcf0
    [ 2748.152087]  xfs_shift_file_space+0x37d/0x6e0 [xfs]
    [ 2748.157557]  xfs_collapse_file_space+0x49/0x120 [xfs]
    [ 2748.163223]  xfs_file_fallocate+0x2a7/0x820 [xfs]
    [ 2748.168462]  vfs_fallocate+0x2cf/0x780
    [ 2748.172642]  SyS_fallocate+0x48/0x80
    [ 2748.176629]  do_syscall_64+0x18a/0x430
    [ 2748.180810]  return_from_SYSCALL_64+0x0/0x6a
    
    Fixed it by checking on offset against end & breaking out first,
    dereference bh only if there're still bufferheads to process.
    
    Signed-off-by: Eryu Guan <eguan@redhat.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Eryu Guan authored and djwong committed May 5, 2017
    Configuration menu
    Copy the full SHA
    161f55e View commit details
    Browse the repository at this point in the history
  22. GFS2: Allow glocks to be unlocked after withdraw

    This bug fixes a regression introduced by patch 0d1c7ae.
    
    The intent of the patch was to stop promoting glocks after a
    file system is withdrawn due to a variety of errors, because doing
    so results in a BUG(). (You should be able to unmount after a
    withdraw rather than having the kernel panic.)
    
    Unfortunately, it also stopped demotions, so glocks could not be
    unlocked after withdraw, which means the unmount would hang.
    
    This patch allows function do_xmote to demote locks to an
    unlocked state after a withdraw, but not promote them.
    
    Signed-off-by: Bob Peterson <rpeterso@redhat.com>
    AstralBob committed May 5, 2017
    Configuration menu
    Copy the full SHA
    ed17545 View commit details
    Browse the repository at this point in the history
  23. fs/affs: add rename2 to prepare multiple methods

    Currently AFFS only supports RENAME_NOREPLACE.
    This patch isolates that method to a static function to
    prepare RENAME_EXCHANGE addition.
    
    Signed-off-by: Fabian Frederick <fabf@skynet.be>
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Fabian Frederick authored and Al Viro committed May 5, 2017
    Configuration menu
    Copy the full SHA
    c618402 View commit details
    Browse the repository at this point in the history
  24. fs/affs: add rename exchange

    Process RENAME_EXCHANGE in affs_rename2() adding static
    affs_xrename() based on affs_rename().
    
    We remove headers from respective directories then
    affect bh to other inode directory entries for swapping.
    
    Signed-off-by: Fabian Frederick <fabf@skynet.be>
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Fabian Frederick authored and Al Viro committed May 5, 2017
    Configuration menu
    Copy the full SHA
    6b46576 View commit details
    Browse the repository at this point in the history
  25. Merge tag 'initramfs-fix-4.12-rc1' of git://github.com/stffrdhrn/linux

    Pull initramfs fix from Stafford Horne:
     "This is a fix for an issue that has caused 4.11 to not boot on
      OpenRISC. I should have caught this during the 4.11 cycle but I had
      been busy on testing some other series of patches.
    
      I would have considered pushing it though a different path but Al Viro
      suggested submitting directly to you.
    
      Also, its just one as I havent really got anything else ready on my
      queue for 4.12.
    
      Summary:
    
       - Ensure fput() flush is done even for builtin initramfs"
    
    * tag 'initramfs-fix-4.12-rc1' of git://github.com/stffrdhrn/linux:
      initramfs: Always do fput() and load modules after rootfs populate
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    58017a3 View commit details
    Browse the repository at this point in the history
  26. Merge tag 'befs-v4.12-rc1' of git://github.com/luisbg/linux-befs

    Pull befs fix from Luis de Bethencourt:
     "One fix from Fabian Frederick making the nfs client still work after a
      cache drop"
    
    * tag 'befs-v4.12-rc1' of git://github.com/luisbg/linux-befs:
      befs: make export work with cold dcache
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    414975e View commit details
    Browse the repository at this point in the history
  27. Merge tag 'for-linus-4.12-ofs-1' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/hubcap/linux
    
    Pull orangefs updates from Mike Marshall:
     "Orangefs cleanups, fixes and statx support.
    
      Some cleanups:
    
       - remove unused get_fsid_from_ino
       - fix bounds check for listxattr
       - clean up oversize xattr validation
       - do not set getattr_time on orangefs_lookup
       - return from orangefs_devreq_read quickly if possible
       - do not wait for timeout if umounting
       - handle zero size write in debugfs
    
      Bug fixes:
    
       - do not check possibly stale size on truncate
       - ensure the userspace component is unmounted if mount fails
       - total reimplementation of dir.c
    
      New feature:
    
       - implement statx
    
      The new implementation of dir.c is kind of a big deal, all new code.
      It has been posted to fs-devel during the previous rc period, we
      didn't get much review or feedback from there, but it has been
      reviewed very heavily here, so much so that we have two entire
      versions of the reimplementation.
    
      Not only does the new implementation fix some xfstests, but it passes
      all the new tests we made here that involve seeking and rewinding and
      giant directories and long file names. The new dir code has three
      patches itself:
    
       - skip forward to the next directory entry if seek is short
       - invalidate stored directory on seek
       - count directory pieces correctly"
    
    * tag 'for-linus-4.12-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
      orangefs: count directory pieces correctly
      orangefs: invalidate stored directory on seek
      orangefs: skip forward to the next directory entry if seek is short
      orangefs: handle zero size write in debugfs
      orangefs: do not wait for timeout if umounting
      orangefs: return from orangefs_devreq_read quickly if possible
      orangefs: ensure the userspace component is unmounted if mount fails
      orangefs: do not check possibly stale size on truncate
      orangefs: implement statx
      orangefs: remove ORANGEFS_READDIR macros
      orangefs: support very large directories
      orangefs: support llseek on directories
      orangefs: rewrite readdir to fix several bugs
      orangefs: do not set getattr_time on orangefs_lookup
      orangefs: clean up oversize xattr validation
      orangefs: fix bounds check for listxattr
      orangefs: remove unused get_fsid_from_ino
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    aeced66 View commit details
    Browse the repository at this point in the history
  28. Merge tag 'gfs2-4.12.fixes' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/gfs2/linux-gfs2
    
    Pull GFS2 updates from Bob Peterson:
     "We've got ten GFS2 patches for this merge window.
    
       - Andreas Gruenbacher wrote a patch to replace the deprecated call to
         rhashtable_walk_init with rhashtable_walk_enter.
    
       - Andreas also wrote a patch to eliminate redundant code in two of
         our debugfs sequence files.
    
       - Andreas also cleaned up the rhashtable key ugliness Linus pointed
         out during this cycle, following Linus's suggestions.
    
       - Andreas also wrote a patch to take advantage of his new function
         rhashtable_lookup_get_insert_fast. This makes glock lookup faster
         and more bullet-proof.
    
       - Andreas also wrote a patch to revert a patch in the evict path that
         caused occasional deadlocks, and is no longer needed.
    
       - Andrew Price wrote a patch to re-enable fallocate for the rindex
         system file to enable gfs2_grow to grow properly on secondary file
         system grow operations.
    
       - I wrote a patch to initialize an inode number field to make certain
         kernel trace points more understandable.
    
       - I also wrote a patch that makes GFS2 file system "withdraw" work
         more like it should by ignoring operations after a withdraw that
         would formerly cause a BUG() and kernel panic.
    
       - I also reworked the entire truncate/delete algorithm, scrapping the
         old recursive algorithm in favor of a new non-recursive algorithm.
         This was done for performance: This way, GFS2 no longer needs to
         lock multiple resource groups while doing truncates and deletes of
         files that cross multiple resource group boundaries, allowing for
         better parallelism. It also solves a problem whereby deleting large
         files would request a large chunk of kernel memory, which resulted
         in a get_page_from_freelist warning.
    
       - Due to a regression found during testing, I added a new patch to
         correct 'GFS2: Prevent BUG from occurring when normal Withdraws
         occur'."
    
    * tag 'gfs2-4.12.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
      GFS2: Allow glocks to be unlocked after withdraw
      GFS2: Non-recursive delete
      gfs2: Re-enable fallocate for the rindex
      Revert "GFS2: Wait for iopen glock dequeues"
      gfs2: Switch to rhashtable_lookup_get_insert_fast
      GFS2: Temporarily zero i_no_addr when creating a dinode
      gfs2: Don't pack struct lm_lockname
      gfs2: Deduplicate gfs2_{glocks,glstats}_open
      gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter
      GFS2: Prevent BUG from occurring when normal Withdraws occur
    torvalds committed May 5, 2017
    Configuration menu
    Copy the full SHA
    1a5fb64 View commit details
    Browse the repository at this point in the history
  29. Revert "ARCv2: Allow enabling PAE40 w/o HIGHMEM"

    This reverts commit 7cab91b.
    
    Now when we have a real hardware platform with PAE40 enabled
    (here I mean axs103 with firmware v1.2) and 1 Gb of DDR mapped to
    0x1_a000_0000-0x1_ffff_ffff we're really targeting memory above 4Gb
    when PAE40 is enabled. This in its turn requires HIGHMEM to be enabled
    otherwise user won't see any difference with enabling PAE in
    kernel configuration as only lowmem will be used anyways.
    
    Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
    Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
    abrodkin authored and vineetgarc committed May 5, 2017
    Configuration menu
    Copy the full SHA
    cf4100d View commit details
    Browse the repository at this point in the history

Commits on May 6, 2017

  1. Merge tag 'drm-forgot-about-tegra-for-v4.12-rc1' of git://people.free…

    …desktop.org/~airlied/linux
    
    Pull drm tegra updates from Dave Airlie:
     "I missed a pull request from Thierry, this stuff has been in
      linux-next for a while anyways.
    
      It does contain a branch from the iommu tree, but Thierry said it
      should be fine"
    
    * tag 'drm-forgot-about-tegra-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux:
      gpu: host1x: Fix host1x driver shutdown
      gpu: host1x: Support module reset
      gpu: host1x: Sort includes alphabetically
      drm/tegra: Add VIC support
      dt-bindings: Add bindings for the Tegra VIC
      drm/tegra: Add falcon helper library
      drm/tegra: Add Tegra DRM allocation API
      drm/tegra: Add tiling FB modifiers
      drm/tegra: Don't leak kernel pointer to userspace
      drm/tegra: Protect IOMMU operations by mutex
      drm/tegra: Enable IOVA API when IOMMU support is enabled
      gpu: host1x: Add IOMMU support
      gpu: host1x: Fix potential out-of-bounds access
      iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m
      iommu: Add dummy implementations for !IOMMU_IOVA
      MAINTAINERS: Add related headers to IOMMU section
      iommu/iova: Consolidate code for adding new node to iovad domain rbtree
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    1062ae4 View commit details
    Browse the repository at this point in the history
  2. Merge tag 'drm-coc-for-v4.12-rc1' of git://people.freedesktop.org/~ai…

    …rlied/linux
    
    Pull drm CoC pointer from Dave Airlie:
     "Small supplementary pull request. I didn't want anyone saying we snuck
      this in in a the middle of a big pile of changes, so here is a clearly
      separate pull request documenting the code of conduct introduced for
      freedesktop.org and how it relates to dri-devel community"
    
    * tag 'drm-coc-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux:
      drm: Document code of conduct
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    bdc713b View commit details
    Browse the repository at this point in the history
  3. Merge tag 'media/v4.12-1' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/mchehab/linux-media
    
    Pull media updates from Mauro Carvalho Chehab:
     "Media updates for v4.12-rc1:
    
       - new driver to support mediatek jpeg in hardware codec
    
       - rc-lirc, s5p-cec and st-cec staging drivers got promoted
    
       - hardware histogram support for vsp1 driver
    
       - added Virtual Media Controller driver, to make easier to test the
         media controller
    
       - added a new CEC driver (rainshadow-cec)
    
       - removed two staging LIRC drivers for obscure hardware that are too
         obsolete
    
       - added support for Intel SR300 Depth camera
    
       - some improvements at CEC and RC core
    
       - lots of driver cleanups, improvements all over the tree
    
      With this series, we're finally getting rid of the LIRC staging
      driver. There's just one left (lirc_zilog), with require more care,
      as part of its functionality (IR RX) is already provided by another
      driver. Work in progress to convert it on the proper way"
    
    * tag 'media/v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (304 commits)
      [media] ov2640: print error if devm_*_optional*() fails
      [media] atmel-isc: Fix the static checker warning
      [media] ov2640: add support for MEDIA_BUS_FMT_YVYU8_2X8 and MEDIA_BUS_FMT_VYUY8_2X8
      [media] ov2640: fix vflip control
      [media] ov2640: fix duplicate width+height returning from ov2640_select_win()
      [media] ov2640: add missing write to size change preamble
      [media] ov2640: add information about DSP register 0xc7
      [media] ov2640: improve banding filter register definitions/documentation
      [media] ov2640: fix init sequence alignment
      [media] ov2640: make GPIOLIB an optional dependency
      [media] xc5000: fix spelling mistake: "calibration"
      [media] vidioc-queryctrl.rst: fix menu/int menu references
      [media] media-entity: only call dev_dbg_obj if mdev is not NULL
      [media] pixfmt-meta-vsp1-hgo.rst: remove spurious '-'
      [media] mtk-vcodec: avoid warnings because of empty macros
      [media] coda: bump maximum number of internal framebuffers to 17
      [media] media: mtk-vcodec: remove informative log
      [media] subdev-formats.rst: remove spurious '-'
      [media] dw2102: limit messages to buffer size
      [media] ttusb2: limit messages to buffer size
      ...
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    e87d51a View commit details
    Browse the repository at this point in the history
  4. Merge tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/gregkh/staging
    
    Pull staging/IIO updates from Greg KH:
     "Here is the big staging tree update for 4.12-rc1.
    
      It's a big one, adding about 350k new lines of crap^Wcode, mostly all
      in a big dump of media drivers from Intel. But there's other new
      drivers in here as well, yet-another-wifi driver, new IIO drivers, and
      a new crypto accelerator.
    
      We also deleted a bunch of stuff, mostly in patch cleanups, but also
      the Android ION code has shrunk a lot, and the Android low memory
      killer driver was finally deleted, much to the celebration of the -mm
      developers.
    
      All of these have been in linux-next with a few build issues that will
      show up when you merge to your tree"
    
    Merge conflicts in the new rtl8723bs driver (due to the wifi changes
    this merge window) handled as per linux-next, courtesy of Stephen
    Rothwell.
    
    * tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1182 commits)
      staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd
      staging: ks7010: remove line continuations in quoted strings
      staging: vt6656: use tabs instead of spaces
      staging: android: ion: Fix unnecessary initialization of static variable
      staging: media: atomisp: fix range checking on clk_num
      staging: media: atomisp: fix misspelled word in comment
      staging: media: atomisp: kmap() can't fail
      staging: atomisp: remove #ifdef for runtime PM functions
      staging: atomisp: satm include directory is gone
      atomisp: remove some more unused files
      atomisp: remove hmm_load/store/clear indirections
      atomisp: kill off mmgr_free
      atomisp: clean up the hmm init/cleanup indirections
      atomisp: handle allocation calls before init in the hmm layer
      staging: fsl-dpaa2/eth: Add maintainer for Ethernet driver
      staging: fsl-dpaa2/eth: Add TODO file
      staging: fsl-dpaa2/eth: Add trace points
      staging: fsl-dpaa2/eth: Add driver specific stats
      staging: fsl-dpaa2/eth: Add ethtool support
      staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver
      ...
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    c6a677c View commit details
    Browse the repository at this point in the history
  5. Merge tag 'libnvdimm-for-4.12' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/nvdimm/nvdimm
    
    Pull libnvdimm updates from Dan Williams:
     "The bulk of this has been in multiple -next releases. There were a few
      late breaking fixes and small features that got added in the last
      couple days, but the whole set has received a build success
      notification from the kbuild robot.
    
      Change summary:
    
       - Region media error reporting: A libnvdimm region device is the
         parent to one or more namespaces. To date, media errors have been
         reported via the "badblocks" attribute attached to pmem block
         devices for namespaces in "raw" or "memory" mode. Given that
         namespaces can be in "device-dax" or "btt-sector" mode this new
         interface reports media errors generically, i.e. independent of
         namespace modes or state.
    
         This subsequently allows userspace tooling to craft "ACPI 6.1
         Section 9.20.7.6 Function Index 4 - Clear Uncorrectable Error"
         requests and submit them via the ioctl path for NVDIMM root bus
         devices.
    
       - Introduce 'struct dax_device' and 'struct dax_operations': Prompted
         by a request from Linus and feedback from Christoph this allows for
         dax capable drivers to publish their own custom dax operations.
         This fixes the broken assumption that all dax operations are
         related to a persistent memory device, and makes it easier for
         other architectures and platforms to add customized persistent
         memory support.
    
       - 'libnvdimm' core updates: A new "deep_flush" sysfs attribute is
         available for storage appliance applications to manually trigger
         memory controllers to drain write-pending buffers that would
         otherwise be flushed automatically by the platform ADR
         (asynchronous-DRAM-refresh) mechanism at a power loss event.
         Support for "locked" DIMMs is included to prevent namespaces from
         surfacing when the namespace label data area is locked. Finally,
         fixes for various reported deadlocks and crashes, also tagged for
         -stable.
    
       - ACPI / nfit driver updates: General updates of the nfit driver to
         add DSM command overrides, ACPI 6.1 health state flags support, DSM
         payload debug available by default, and various fixes.
    
      Acknowledgements that came after the branch was pushed:
    
       - commmit 565851c "device-dax: fix sysfs attribute deadlock":
         Tested-by: Yi Zhang <yizhan@redhat.com>
    
       - commit 23f4984 "libnvdimm: rework region badblocks clearing"
         Tested-by: Toshi Kani <toshi.kani@hpe.com>"
    
    * tag 'libnvdimm-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (52 commits)
      libnvdimm, pfn: fix 'npfns' vs section alignment
      libnvdimm: handle locked label storage areas
      libnvdimm: convert NDD_ flags to use bitops, introduce NDD_LOCKED
      brd: fix uninitialized use of brd->dax_dev
      block, dax: use correct format string in bdev_dax_supported
      device-dax: fix sysfs attribute deadlock
      libnvdimm: restore "libnvdimm: band aid btt vs clear poison locking"
      libnvdimm: fix nvdimm_bus_lock() vs device_lock() ordering
      libnvdimm: rework region badblocks clearing
      acpi, nfit: kill ACPI_NFIT_DEBUG
      libnvdimm: fix clear length of nvdimm_forget_poison()
      libnvdimm, pmem: fix a NULL pointer BUG in nd_pmem_notify
      libnvdimm, region: sysfs trigger for nvdimm_flush()
      libnvdimm: fix phys_addr for nvdimm_clear_poison
      x86, dax, pmem: remove indirection around memcpy_from_pmem()
      block: remove block_device_operations ->direct_access()
      block, dax: convert bdev_dax_supported() to dax_direct_access()
      filesystem-dax: convert to dax_direct_access()
      Revert "block: use DAX for partition table reads"
      ext2, ext4, xfs: retrieve dax_device for iomap operations
      ...
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    53ef7d0 View commit details
    Browse the repository at this point in the history
  6. Merge tag 'for-4.12/dm-fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/device-mapper/linux-dm
    
    Pull device mapper fixes from Mike Snitzer:
    
     - DM cache metadata fixes to short-circuit operations that require the
       metadata not be in 'fail_io' mode. Otherwise crashes are possible.
    
     - a DM cache fix to address the inability to adapt to continuous IO
       that happened to also reflect a changing working set (which required
       old blocks be demoted before the new working set could be promoted)
    
     - a DM cache smq policy cleanup that fell out from reviewing the above
    
     - fix the Kconfig help text for CONFIG_DM_INTEGRITY
    
    * tag 'for-4.12/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
      dm cache metadata: fail operations if fail_io mode has been established
      dm integrity: improve the Kconfig help text for DM_INTEGRITY
      dm cache policy smq: cleanup free_target_met() and clean_target_met()
      dm cache policy smq: allow demotions to happen even during continuous IO
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    2eecf3a View commit details
    Browse the repository at this point in the history
  7. Merge tag 'devicetree-for-4.12' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/robh/linux
    
    Pull DeviceTree updates from Rob Herring:
    
     - fix sparse warnings in drivers/of/
    
     - add more overlay unittests
    
     - update dtc to v1.4.4-8-g756ffc4f52f6. This adds more checks on dts
       files such as unit-address formatting and stricter character sets for
       node and property names
    
     - add a common DT modalias function
    
     - move trivial-devices.txt up and out of i2c dir
    
     - ARM NVIC interrupt controller binding
    
     - vendor prefixes for Sensirion, Dioo, Nordic, ROHM
    
     - correct some binding file locations
    
    * tag 'devicetree-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (24 commits)
      of: fix sparse warnings in fdt, irq, reserved mem, and resolver code
      of: fix sparse warning in of_pci_range_parser_one
      of: fix sparse warnings in of_find_next_cache_node
      of/unittest: Missing unlocks on error
      of: fix uninitialized variable warning for overlay test
      of: fix unittest build without CONFIG_OF_OVERLAY
      of: Add unit tests for applying overlays
      of: per-file dtc compiler flags
      fpga: region: add missing DT documentation for config complete timeout
      of: Add vendor prefix for ROHM Semiconductor
      of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes()
      of: Add vendor prefix for Nordic Semiconductor
      dt-bindings: arm,nvic: Binding for ARM NVIC interrupt controller on Cortex-M
      dtc: update warning settings for new bus and node/property name checks
      scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6
      scripts/dtc: automate getting dtc version and log in update script
      of: Add function for generating a DT modalias with a newline
      of: fix of_device_get_modalias returned length when truncating buffers
      Documentation: devicetree: move trivial-devices out of I2C realm
      dt-bindings: add vendor prefix for Dioo
      ..
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    3ef2bc0 View commit details
    Browse the repository at this point in the history
  8. initramfs: avoid "label at end of compound statement" error

    Commit 17a9be3 ("initramfs: Always do fput() and load modules after
    rootfs populate") introduced an error for the
    
        CONFIG_BLK_DEV_RAM=y
    
    case, because even though the code looks fine, the compiler really wants
    a statement after a label, or you'll get complaints:
    
      init/initramfs.c: In function 'populate_rootfs':
      init/initramfs.c:644:2: error: label at end of compound statement
    
    That commit moved the subsequent statements to outside the compound
    statement, leaving the label without any associated statements.
    
    Reported-by: Jörg Otte <jrg.otte@gmail.com>
    Fixes: 17a9be3 ("initramfs: Always do fput() and load modules after rootfs populate")
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Stafford Horne <shorne@gmail.com>
    Cc: stable@vger.kernel.org  # if 17a9be3 gets backported
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    394e4f5 View commit details
    Browse the repository at this point in the history
  9. docs: bump minimal GNU Make version to 3.81

    Since 2014, you can't successfully build kernels with GNU Make version
    3.80. Example errors:
    
      $ git describe
      v4.11
      $ make --version | head -1
      GNU Make 3.80
      $ make defconfig
        HOSTCC  scripts/basic/fixdep
      scripts/Makefile.host:135: *** missing separator.  Stop.
      make: *** [defconfig] Error 2
      $ make ARCH=arm64 help
      arch/arm64/Makefile:43: *** unterminated call to function `warning': missing `)'.  Stop.
      $ make help >/dev/null
      ./Documentation/Makefile.sphinx:25: Extraneous text after `else' directive
      ./Documentation/Makefile.sphinx:31: *** only one `else' per conditional.  Stop.
      make: *** [help] Error 2
    
    The first breakage was introduced by commit c8589d1 ("kbuild:
    handle multi-objs dependency appropriately").  Since then (i.e. v3.18),
    GNU Make 3.80 has not been able to compile the kernel, but nobody has
    ever complained aboutt (or noticed) it.
    
    Even GNU Make 3.81 is more than 10 years old.  It would not hurt to
    match the documentation with reality instead of fixing makefiles.
    
    Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    masahir0y authored and torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    37d69ee View commit details
    Browse the repository at this point in the history
  10. refcount: change EXPORT_SYMBOL markings

    Now that kref is using the refcount apis, the _GPL markings are getting
    exported to places that it previously wasn't.  Now kref.h is GPLv2
    licensed, so any non-GPL code using it better be talking to some
    lawyers, but changing api markings isn't considered "nice", so let's fix
    this up.
    
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    gregkh authored and torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    d557d1b View commit details
    Browse the repository at this point in the history
  11. Merge branch 'for-linus' of git://git.kernel.dk/linux-block

    Pull block fixes and updates from Jens Axboe:
     "Some fixes and followup features/changes that should go in, in this
      merge window. This contains:
    
       - Two fixes for lightnvm from Javier, fixing problems in the new code
         merge previously in this merge window.
    
       - A fix from Jan for the backing device changes, fixing an issue in
         NFS that causes a failure to mount on certain setups.
    
       - A change from Christoph, cleaning up the blk-mq init and exit
         request paths.
    
       - Remove elevator_change(), which is now unused. From Bart.
    
       - A fix for queue operation invocation on a dead queue, from Bart.
    
       - A series fixing up mtip32xx for blk-mq scheduling, removing a
         bandaid we previously had in place for this. From me.
    
       - A regression fix for this series, fixing a case where we wait on
         workqueue flushing from an invalid (non-blocking) context. From me.
    
       - A fix/optimization from Ming, ensuring that we don't both quiesce
         and freeze a queue at the same time.
    
       - A fix from Peter on lock ordering for CPU hotplug. Not a real
         problem right now, but will be once the CPU hotplug rework goes in.
    
       - A series from Omar, cleaning up out blk-mq debugfs support, and
         adding support for exporting info from schedulers in debugfs as
         well. This is really useful in debugging stalls or livelocks. From
         Omar"
    
    * 'for-linus' of git://git.kernel.dk/linux-block: (28 commits)
      mq-deadline: add debugfs attributes
      kyber: add debugfs attributes
      blk-mq-debugfs: allow schedulers to register debugfs attributes
      blk-mq: untangle debugfs and sysfs
      blk-mq: move debugfs declarations to a separate header file
      blk-mq: Do not invoke queue operations on a dead queue
      blk-mq-debugfs: get rid of a bunch of boilerplate
      blk-mq-debugfs: rename hw queue directories from <n> to hctx<n>
      blk-mq-debugfs: don't open code strstrip()
      blk-mq-debugfs: error on long write to queue "state" file
      blk-mq-debugfs: clean up flag definitions
      blk-mq-debugfs: separate flags with |
      nfs: Fix bdi handling for cloned superblocks
      block/mq: Cure cpu hotplug lock inversion
      lightnvm: fix bad back free on error path
      lightnvm: create cmd before allocating request
      blk-mq: don't use sync workqueue flushing from drivers
      mtip32xx: convert internal commands to regular block infrastructure
      mtip32xx: cleanup internal tag assumptions
      block: don't call blk_mq_quiesce_queue() after queue is frozen
      ...
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    044f1da View commit details
    Browse the repository at this point in the history
  12. Merge tag 'xfs-4.12-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/x…

    …fs-linux
    
    Pull xfs updates from Darrick Wong:
     "Here are the XFS changes for 4.12. The big new feature for this
      release is the new space mapping ioctl that we've been discussing
      since LSF2016, but other than that most of the patches are larger bug
      fixes, memory corruption prevention, and other cleanups.
    
      Summary:
       - various code cleanups
       - introduce GETFSMAP ioctl
       - various refactoring
       - avoid dio reads past eof
       - fix memory corruption and other errors with fragmented directory blocks
       - fix accidental userspace memory corruptions
       - publish fs uuid in superblock
       - make fstrim terminatable
       - fix race between quotaoff and in-core inode creation
       - avoid use-after-free when finishing up w/ buffer heads
       - reserve enough space to handle bmap tree resizing during cow remap"
    
    * tag 'xfs-4.12-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (53 commits)
      xfs: fix use-after-free in xfs_finish_page_writeback
      xfs: reserve enough blocks to handle btree splits when remapping
      xfs: wait on new inodes during quotaoff dquot release
      xfs: update ag iterator to support wait on new inodes
      xfs: support ability to wait on new inodes
      xfs: publish UUID in struct super_block
      xfs: Allow user to kill fstrim process
      xfs: better log intent item refcount checking
      xfs: fix up quotacheck buffer list error handling
      xfs: remove xfs_trans_ail_delete_bulk
      xfs: don't use bool values in trace buffers
      xfs: fix getfsmap userspace memory corruption while setting OF_LAST
      xfs: fix __user annotations for xfs_ioc_getfsmap
      xfs: corruption needs to respect endianess too!
      xfs: use NULL instead of 0 to initialize a pointer in xfs_ioc_getfsmap
      xfs: use NULL instead of 0 to initialize a pointer in xfs_getfsmap
      xfs: simplify validation of the unwritten extent bit
      xfs: remove unused values from xfs_exntst_t
      xfs: remove the unused XFS_MAXLINK_1 define
      xfs: more do_div cleanups
      ...
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    d484467 View commit details
    Browse the repository at this point in the history
  13. Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

    Pull cifs fixes from Steve French:
     "Various fixes for stable for CIFS/SMB3 especially for better
      interoperability for SMB3 to Macs.
    
      It also includes Pavel's improvements to SMB3 async i/o support
      (which is much faster now)"
    
    * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
      CIFS: add misssing SFM mapping for doublequote
      SMB3: Work around mount failure when using SMB3 dialect to Macs
      cifs: fix CIFS_IOC_GET_MNT_INFO oops
      CIFS: fix mapping of SFM_SPACE and SFM_PERIOD
      CIFS: fix oplock break deadlocks
      cifs: fix CIFS_ENUMERATE_SNAPSHOTS oops
      cifs: fix leak in FSCTL_ENUM_SNAPS response handling
      Set unicode flag on cifs echo request to avoid Mac error
      CIFS: Add asynchronous write support through kernel AIO
      CIFS: Add asynchronous read support through kernel AIO
      CIFS: Add asynchronous context to support kernel AIO
      cifs: fix IPv6 link local, with scope id, address parsing
      cifs: small underflow in cnvrtDosUnixTm()
    torvalds committed May 6, 2017
    Configuration menu
    Copy the full SHA
    fe7a719 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2017

  1. docs: complete bumping minimal GNU Make version to 3.81

    Commit 37d69ee ("docs: bump minimal GNU Make version to 3.81")
    changes one entry of GNU make version in the changes.rst, there's still
    one more entry saying that one need version 3.80.  Fix that.
    
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    jcmvbkbc authored and torvalds committed May 7, 2017
    Configuration menu
    Copy the full SHA
    13e0988 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2a4e669 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2017

  1. mac80211: properly remove RX_ENC_FLAG_40MHZ

    Somehow I missed this in my RX rate cleanup series, causing some
    drivers to not report correct bandwidth since this flag isn't
    used by mac80211 anymore. Fix this, and make hwsim also report
    higher bandwidths appropriately.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    jmberg-intel committed May 8, 2017
    Configuration menu
    Copy the full SHA
    2f242bf View commit details
    Browse the repository at this point in the history
  2. mac80211: bail out from prep_connection() if a reconfig is ongoing

    If ieee80211_hw_restart() is called during authentication, the
    authentication process will continue, causing the driver to be called
    in a wrong state.  This ultimately causes an oops in the iwlwifi
    driver (at least).
    
    This fixes bugzilla 195299 partly.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195299
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    lucacoelho authored and jmberg-intel committed May 8, 2017
    Configuration menu
    Copy the full SHA
    f8860ce View commit details
    Browse the repository at this point in the history
  3. nl80211: correctly validate MU-MIMO groups

    Since groups 0 and 63 are invalid, we should check for those bits.
    Note that the 802.11 spec specifies the *bit* order, but the CPU
    doesn't care about bit order since it can't address bits, so it's
    always treating BIT(0) as the lowest bit within a byte.
    
    Reported-by: Jan Fuchs <jan.fuchs@lancom.de>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    jmberg-intel committed May 8, 2017
    Configuration menu
    Copy the full SHA
    4954601 View commit details
    Browse the repository at this point in the history
  4. mac80211: fix IBSS presp allocation size

    When VHT IBSS support was added, the size of the extra elements
    wasn't considered in ieee80211_ibss_build_presp(), which makes
    it possible that it would overrun the allocated buffer. Fix it
    by allocating the necessary space.
    
    Fixes: abcff6e ("mac80211: add VHT support for IBSS")
    Reported-by: Shaul Triebitz <shaul.triebitz@intel.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    jmberg-intel committed May 8, 2017
    Configuration menu
    Copy the full SHA
    f1f3e9e View commit details
    Browse the repository at this point in the history
  5. cfg80211: fix multi scheduled scan kernel-doc

    Replace @results_wk with @report_results, which was missed
    in an earlier patch between revisions thereof.
    
    Fixes: b34939b ("cfg80211: add request id to cfg80211_sched_scan_*() api")
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    jmberg-intel committed May 8, 2017
    Configuration menu
    Copy the full SHA
    6406c91 View commit details
    Browse the repository at this point in the history
  6. aquantia: Fix "ethtool -S" crash when adapter down.

    This patch fixes the crash that happens when driver tries to collect statistics
    from already released "aq_vec" object.
    If adapter is in "down" state we still allow user to see statistics from HW.
    
    V2: fixed braces around "aq_vec_free".
    
    Fixes: 97bde5c ("net: ethernet: aquantia: Support for NIC-specific code")
    Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
    Tested-by: David Arcari <darcari@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Pavel Belous authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    3013c49 View commit details
    Browse the repository at this point in the history
  7. fix braino in generic_file_read_iter()

    Wrong sign of iov_iter_revert() argument.  Unfortunately, slipped through
    the testing, since most of the time we don't do anything to the iterator
    afterwards and potential oops on walking the iter->iov too far backwards
    is too infrequent to be easily triggered.
    
    Add a sanity check in iov_iter_revert() to catch bugs like this one;
    fortunately, the same braino hadn't happened in other callers, but we'd
    better have a warning if such thing crops up.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Al Viro committed May 8, 2017
    Configuration menu
    Copy the full SHA
    5b47d59 View commit details
    Browse the repository at this point in the history
  8. Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/tytso/ext4
    
    Pull ext4 updates from Ted Ts'o:
    
     - add GETFSMAP support
    
     - some performance improvements for very large file systems and for
       random write workloads into a preallocated file
    
     - bug fixes and cleanups.
    
    * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
      jbd2: cleanup write flags handling from jbd2_write_superblock()
      ext4: mark superblock writes synchronous for nobarrier mounts
      ext4: inherit encryption xattr before other xattrs
      ext4: replace BUG_ON with WARN_ONCE in ext4_end_bio()
      ext4: avoid unnecessary transaction stalls during writeback
      ext4: preload block group descriptors
      ext4: make ext4_shutdown() static
      ext4: support GETFSMAP ioctls
      vfs: add common GETFSMAP ioctl definitions
      ext4: evict inline data when writing to memory map
      ext4: remove ext4_xattr_check_entry()
      ext4: rename ext4_xattr_check_names() to ext4_xattr_check_entries()
      ext4: merge ext4_xattr_list() into ext4_listxattr()
      ext4: constify static data that is never modified
      ext4: trim return value and 'dir' argument from ext4_insert_dentry()
      jbd2: fix dbench4 performance regression for 'nobarrier' mounts
      jbd2: Fix lockdep splat with generic/270 test
      mm: retry writepages() on ENOMEM when doing an data integrity writeback
    torvalds committed May 8, 2017
    Configuration menu
    Copy the full SHA
    dd727da View commit details
    Browse the repository at this point in the history
  9. ipv4: restore rt->fi for reference counting

    IPv4 dst could use fi->fib_metrics to store metrics but fib_info
    itself is refcnt'ed, so without taking a refcnt fi and
    fi->fib_metrics could be freed while dst metrics still points to
    it. This triggers use-after-free as reported by Andrey twice.
    
    This patch reverts commit 2860583 ("ipv4: Kill rt->fi") to
    restore this reference counting. It is a quick fix for -net and
    -stable, for -net-next, as Eric suggested, we can consider doing
    reference counting for metrics itself instead of relying on fib_info.
    
    IPv6 is very different, it copies or steals the metrics from mx6_config
    in fib6_commit_metrics() so probably doesn't need a refcnt.
    
    Decnet has already done the refcnt'ing, see dn_fib_semantic_match().
    
    Fixes: 2860583 ("ipv4: Kill rt->fi")
    Reported-by: Andrey Konovalov <andreyknvl@google.com>
    Tested-by: Andrey Konovalov <andreyknvl@google.com>
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Acked-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    congwang authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    82486aa View commit details
    Browse the repository at this point in the history
  10. tcp: make congestion control optionally skip slow start after idle

    Congestion control modules that want full control over congestion
    control behavior do not want the cwnd modifications controlled by
    the sysctl_tcp_slow_start_after_idle code path.
    So skip those code paths for CC modules that use the cong_control()
    API.
    As an example, those cwnd effects are not desired for the BBR congestion
    control algorithm.
    
    Fixes: c040276 ("tcp: new CC hook to set sending rate with rate_sample in any CA state")
    Signed-off-by: Wei Wang <weiwan@google.com>
    Signed-off-by: Yuchung Cheng <ycheng@google.com>
    Signed-off-by: Neal Cardwell <ncardwell@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    tracywwnj authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    1b1fc3f View commit details
    Browse the repository at this point in the history
  11. vlan: Keep NETIF_F_HW_CSUM similar to other software devices

    Vlan devices, like all other software devices, enable
    NETIF_F_HW_CSUM feature.  However, unlike all the othe other
    software devices, vlans will switch to using IP|IPV6_CSUM
    features, if the underlying devices uses them.  In these situations,
    checksum offload features on the vlan device can't be controlled
    via ethtool.
    
    This patch makes vlans keep HW_CSUM feature if the underlying
    device supports checksum offloading.  This makes vlan devices
    behave like other software devices, and restores control to the
    user.
    
    A side-effect is that some offload settings (typically UFO)
    may be enabled on the vlan device while being disabled on the HW.
    However, the GSO code will correctly process the packets. This
    actually results in slightly better raw throughput.
    
    Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
    Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vyasevich authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    8403deb View commit details
    Browse the repository at this point in the history
  12. Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/tytso/fscrypt
    
    Pull fscrypt updates from Ted Ts'o:
     "Only bug fixes and cleanups for this merge window"
    
    * tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt:
      fscrypt: correct collision claim for digested names
      MAINTAINERS: fscrypt: update mailing list, patchwork, and git
      ext4: clean up ext4_match() and callers
      f2fs: switch to using fscrypt_match_name()
      ext4: switch to using fscrypt_match_name()
      fscrypt: introduce helper function for filename matching
      fscrypt: avoid collisions when presenting long encrypted filenames
      f2fs: check entire encrypted bigname when finding a dentry
      ubifs: check for consistent encryption contexts in ubifs_lookup()
      f2fs: sync f2fs_lookup() with ext4_lookup()
      ext4: remove "nokey" check from ext4_lookup()
      fscrypt: fix context consistency check when key(s) unavailable
      fscrypt: Remove __packed from fscrypt_policy
      fscrypt: Move key structure and constants to uapi
      fscrypt: remove fscrypt_symlink_data_len()
      fscrypt: remove unnecessary checks for NULL operations
    torvalds committed May 8, 2017
    Configuration menu
    Copy the full SHA
    677375c View commit details
    Browse the repository at this point in the history
  13. bna: Avoid reading past end of buffer

    Using memcpy() from a string that is shorter than the length copied means
    the destination buffer is being filled with arbitrary data from the kernel
    rodata segment. Instead, use strncpy() which will fill the trailing bytes
    with zeros.
    
    This was found with the future CONFIG_FORTIFY_SOURCE feature.
    
    Cc: Daniel Micay <danielmicay@gmail.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    kees authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    9e4eb1c View commit details
    Browse the repository at this point in the history
  14. bna: ethtool: Avoid reading past end of buffer

    Using memcpy() from a string that is shorter than the length copied means
    the destination buffer is being filled with arbitrary data from the kernel
    rodata segment. Instead, use strncpy() which will fill the trailing bytes
    with zeros.
    
    This was found with the future CONFIG_FORTIFY_SOURCE feature.
    
    Cc: Daniel Micay <danielmicay@gmail.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    kees authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    4dc69c1 View commit details
    Browse the repository at this point in the history
  15. qlge: Avoid reading past end of buffer

    Using memcpy() from a string that is shorter than the length copied means
    the destination buffer is being filled with arbitrary data from the kernel
    rodata segment. Instead, use strncpy() which will fill the trailing bytes
    with zeros.
    
    This was found with the future CONFIG_FORTIFY_SOURCE feature.
    
    Cc: Daniel Micay <danielmicay@gmail.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    kees authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    df5303a View commit details
    Browse the repository at this point in the history
  16. bnxt_en: allocate enough space for ->ntp_fltr_bmap

    We have the number of longs, but we need to calculate the number of
    bytes required.
    
    Fixes: c0c050c ("bnxt_en: New Broadcom ethernet driver.")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Dan Carpenter authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    ac45bd9 View commit details
    Browse the repository at this point in the history
  17. bonding: check nla_put_be32 return value

    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    liuhangbin authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    d62844a View commit details
    Browse the repository at this point in the history
  18. net: dsa: loop: Check for memory allocation failure

    If 'devm_kzalloc' fails, a NULL pointer will be dereferenced.
    Return -ENOMEM instead, as done for some other memory allocation just a
    few lines above.
    
    Fixes: 98cd155 ("net: dsa: Mock-up driver")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    tititiou36 authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    8ce7aaa View commit details
    Browse the repository at this point in the history
  19. cxgb4: avoid disabling FEC by default

    Recent Chelsio firmware started using few port capablity bits to
    manage FEC and as driver was not aware of FEC changes those bits
    were zeroed, consequently disabling FEC.
    
    Avoid zeroing those bits and default to whatever the firmware
    tells us the Link is currently advertising.
    
    Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Ganesh Goudar authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    3bb4858 View commit details
    Browse the repository at this point in the history
  20. net/hippi/rrunner: use memdup_user

    Use memdup_user() helper instead of open-coding to simplify the code.
    
    Signed-off-by: Geliang Tang <geliangtang@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    geliangtang authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    294316a View commit details
    Browse the repository at this point in the history
  21. yam: use memdup_user

    Use memdup_user() helper instead of open-coding to simplify the code.
    
    Signed-off-by: Geliang Tang <geliangtang@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    geliangtang authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    871ff2e View commit details
    Browse the repository at this point in the history
  22. bpf: don't let ldimm64 leak map addresses on unprivileged

    The patch fixes two things at once:
    
    1) It checks the env->allow_ptr_leaks and only prints the map address to
       the log if we have the privileges to do so, otherwise it just dumps 0
       as we would when kptr_restrict is enabled on %pK. Given the latter is
       off by default and not every distro sets it, I don't want to rely on
       this, hence the 0 by default for unprivileged.
    
    2) Printing of ldimm64 in the verifier log is currently broken in that
       we don't print the full immediate, but only the 32 bit part of the
       first insn part for ldimm64. Thus, fix this up as well; it's okay to
       access, since we verified all ldimm64 earlier already (including just
       constants) through replace_map_fd_with_map_ptr().
    
    Fixes: 1be7f75 ("bpf: enable non-root eBPF programs")
    Fixes: cbd3570 ("bpf: verifier (add ability to receive verification log)")
    Reported-by: Jann Horn <jannh@google.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    borkmann authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    0d0e576 View commit details
    Browse the repository at this point in the history
  23. vti: check nla_put_* return value

    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    liuhangbin authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    8ed508f View commit details
    Browse the repository at this point in the history
  24. stmmac: pci: set default number of rx and tx queues

    The commit 26d6851
    
    	("net: stmmac: set default number of rx and tx queues in stmmac_pci")
    
    missed Intel Quark configuration. Append it here.
    
    Fixes: 26d6851 ("net: stmmac: set default number of rx and tx queues in stmmac_pci")
    Cc: Joao Pinto <Joao.Pinto@synopsys.com>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Joao Pinto <jpinto@synopsys.com>
    Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    andy-shev authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    05c5d00 View commit details
    Browse the repository at this point in the history
  25. stmmac: pci: TX and RX queue priority configuration

    The commit a8f5102
    
    	("net: stmmac: TX and RX queue priority configuration")
    
    missed Intel Quark configuration. Append it here.
    
    Fixes: a8f5102 ("net: stmmac: TX and RX queue priority configuration")
    Cc: Joao Pinto <Joao.Pinto@synopsys.com>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Joao Pinto <jpinto@synopsys.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    andy-shev authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    a1437e5 View commit details
    Browse the repository at this point in the history
  26. stmmac: pci: RX queue routing configuration

    The commit abe80fd
    
        ("net: stmmac: RX queue routing configuration")
    
    missed Intel Quark configuration. Append it here.
    
    Fixes: abe80fd ("net: stmmac: RX queue routing configuration")
    Cc: Joao Pinto <Joao.Pinto@synopsys.com>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Joao Pinto <jpinto@synopsys.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    andy-shev authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    efcd241 View commit details
    Browse the repository at this point in the history
  27. stmmac: pci: split out common_default_data() helper

    New helper is added in order to prevent misconfiguration happened
    for one of the platforms when configuration data is expanded.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Joao Pinto <jpinto@synopsys.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    andy-shev authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    70fe443 View commit details
    Browse the repository at this point in the history
  28. Merge branch 'stmmac-pci-fix-crash-on-Intel-Galileo-Gen2'

    Andy Shevchenko says:
    
    ====================
    stmmac: pci: Fix crash on Intel Galileo Gen2
    
    Due to misconfiguration of PCI driver for Intel Quark the user will get
    a kernel crash:
    
    udhcpc: started, v1.26.2
    stmmaceth 0000:00:14.6 eth0: device MAC address 98:4f:ee:05:ac:47
    Generic PHY stmmac-a6:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-a6:01, irq=-1)
    stmmaceth 0000:00:14.6 eth0: IEEE 1588-2008 Advanced Timestamp supported
    stmmaceth 0000:00:14.6 eth0: registered PTP clock
    IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    
    udhcpc: sending discover
    
    stmmaceth 0000:00:14.6 eth0: Link is Up - 100Mbps/Full - flow control off
    IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: stmmac_xmit+0xf1/0x1080
    
    Fix this by adding necessary settings.
    
    P.S. I split fix to three patches according to what each of them adds.
    ====================
    
    Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    b210aea View commit details
    Browse the repository at this point in the history
  29. Merge tag 'for-f2fs-4.12' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/jaegeuk/f2fs
    
    Pull f2fs updates from Jaegeuk Kim:
     "In this round, we've focused on enhancing performance with regards to
      block allocation, GC, and discard/in-place-update IO controls. There
      are a bunch of clean-ups as well as minor bug fixes.
    
      Enhancements:
       - disable heap-based allocation by default
       - issue small-sized discard commands by default
       - change the policy of data hotness for logging
       - distinguish IOs in terms of size and wbc type
       - start SSR earlier to avoid foreground GC
       - enhance data structures managing discard commands
       - enhance in-place update flow
       - add some more fault injection routines
       - secure one more xattr entry
    
      Bug fixes:
       - calculate victim cost for GC correctly
       - remain correct victim segment number for GC
       - race condition in nid allocator and initializer
       - stale pointer produced by atomic_writes
       - fix missing REQ_SYNC for flush commands
       - handle missing errors in more corner cases"
    
    * tag 'for-f2fs-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (111 commits)
      f2fs: fix a mount fail for wrong next_scan_nid
      f2fs: enhance scalability of trace macro
      f2fs: relocate inode_{,un}lock in F2FS_IOC_SETFLAGS
      f2fs: Make flush bios explicitely sync
      f2fs: show available_nids in f2fs/status
      f2fs: flush dirty nats periodically
      f2fs: introduce CP_TRIMMED_FLAG to avoid unneeded discard
      f2fs: allow cpc->reason to indicate more than one reason
      f2fs: release cp and dnode lock before IPU
      f2fs: shrink size of struct discard_cmd
      f2fs: don't hold cmd_lock during waiting discard command
      f2fs: nullify fio->encrypted_page for each writes
      f2fs: sanity check segment count
      f2fs: introduce valid_ipu_blkaddr to clean up
      f2fs: lookup extent cache first under IPU scenario
      f2fs: reconstruct code to write a data page
      f2fs: introduce __wait_discard_cmd
      f2fs: introduce __issue_discard_cmd
      f2fs: enable small discard by default
      f2fs: delay awaking discard thread
      ...
    torvalds committed May 8, 2017
    Configuration menu
    Copy the full SHA
    70ef8f0 View commit details
    Browse the repository at this point in the history
  30. Merge tag 'xtensa-20170507' of git://github.com/jcmvbkbc/linux-xtensa

    Pull Xtensa updates from Max Filippov:
    
     - clearly mark references to spilled register locations with SPILL_SLOT
       macros
    
     - clean up xtensa ptrace: use generic tracehooks, move internal kernel
       definitions from uapi/asm to asm, make locally-used functions static,
       fix code style and alignment
    
     - use command line parameters passed to ISS as kernel command line.
    
    * tag 'xtensa-20170507' of git://github.com/jcmvbkbc/linux-xtensa:
      xtensa: clean up access to spilled registers locations
      xtensa: use generic tracehooks
      xtensa: move internal ptrace definitions from uapi/asm to asm
      xtensa: clean up xtensa/kernel/ptrace.c
      xtensa: drop unused fast_io_protect function
      xtensa: use ITLB_HIT_BIT instead of hardcoded number
      xtensa: ISS: update kernel command line in platform_setup
      xtensa: ISS: add argc/argv simcall definitions
      xtensa: ISS: cleanup setup.c
    torvalds committed May 8, 2017
    Configuration menu
    Copy the full SHA
    d9dc089 View commit details
    Browse the repository at this point in the history
  31. Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

    Pull ARM updates from Russell King:
     "Lots of little things this time:
    
       - allow modules to be autoloaded according to the HWCAP feature bits
         (used primarily for crypto modules)
    
       - split module core and init PLT sections, since the core code and
         init code could be placed far apart, and the PLT sections need to
         be local to the code block.
    
       - three patches from Chris Brandt to allow Cortex-A9 L2 cache
         optimisations to be disabled where a SoC didn't wire up the out of
         band signals.
    
       - NoMMU compliance fixes, avoiding corruption of vector table which
         is not being used at this point, and avoiding possible register
         state corruption when switching mode.
    
       - fixmap memory attribute compliance update.
    
       - remove unnecessary locking from update_sections_early()
    
       - ftrace fix for DEBUG_RODATA with !FRAME_POINTER"
    
    * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
      ARM: 8672/1: mm: remove tasklist locking from update_sections_early()
      ARM: 8671/1: V7M: Preserve registers across switch from Thread to Handler mode
      ARM: 8670/1: V7M: Do not corrupt vector table around v7m_invalidate_l1 call
      ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER
      ARM: 8667/3: Fix memory attribute inconsistencies when using fixmap
      ARM: 8663/1: wire up HWCAP/HWCAP2 feature bits to the CPU modalias
      ARM: 8666/1: mm: dump: Add domain to output
      ARM: 8662/1: module: split core and init PLT sections
      ARM: 8661/1: dts: r7s72100: add l2 cache
      ARM: 8660/1: shmobile: r7s72100: Enable L2 cache
      ARM: 8659/1: l2c: allow CA9 optimizations to be disabled
    torvalds committed May 8, 2017
    Configuration menu
    Copy the full SHA
    9c6ee01 View commit details
    Browse the repository at this point in the history
  32. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull KVM updates from Paolo Bonzini:
     "ARM:
       - HYP mode stub supports kexec/kdump on 32-bit
       - improved PMU support
       - virtual interrupt controller performance improvements
       - support for userspace virtual interrupt controller (slower, but
         necessary for KVM on the weird Broadcom SoCs used by the Raspberry
         Pi 3)
    
      MIPS:
       - basic support for hardware virtualization (ImgTec P5600/P6600/I6400
         and Cavium Octeon III)
    
      PPC:
       - in-kernel acceleration for VFIO
    
      s390:
       - support for guests without storage keys
       - adapter interruption suppression
    
      x86:
       - usual range of nVMX improvements, notably nested EPT support for
         accessed and dirty bits
       - emulation of CPL3 CPUID faulting
    
      generic:
       - first part of VCPU thread request API
       - kvm_stat improvements"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (227 commits)
      kvm: nVMX: Don't validate disabled secondary controls
      KVM: put back #ifndef CONFIG_S390 around kvm_vcpu_kick
      Revert "KVM: Support vCPU-based gfn->hva cache"
      tools/kvm: fix top level makefile
      KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING
      KVM: Documentation: remove VM mmap documentation
      kvm: nVMX: Remove superfluous VMX instruction fault checks
      KVM: x86: fix emulation of RSM and IRET instructions
      KVM: mark requests that need synchronization
      KVM: return if kvm_vcpu_wake_up() did wake up the VCPU
      KVM: add explicit barrier to kvm_vcpu_kick
      KVM: perform a wake_up in kvm_make_all_cpus_request
      KVM: mark requests that do not need a wakeup
      KVM: remove #ifndef CONFIG_S390 around kvm_vcpu_wake_up
      KVM: x86: always use kvm_make_request instead of set_bit
      KVM: add kvm_{test,clear}_request to replace {test,clear}_bit
      s390: kvm: Cpu model support for msa6, msa7 and msa8
      KVM: x86: remove irq disablement around KVM_SET_CLOCK/KVM_GET_CLOCK
      kvm: better MWAIT emulation for guests
      KVM: x86: virtualize cpuid faulting
      ...
    torvalds committed May 8, 2017
    Configuration menu
    Copy the full SHA
    2d3e486 View commit details
    Browse the repository at this point in the history
  33. net: cdc_ncm: Fix TX zero padding

    The zero padding that is added to NTB's does
    not zero the memory correctly.
    This is because the skb_put modifies the value
    of skb_out->len which results in the memset
    command not setting any memory to zero as
    (ctx->tx_max - skb_out->len) == 0.
    
    I have resolved this by storing the size of
    the memory to be zeroed before the skb_put
    and using this in the memset call.
    
    Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
    Reviewed-by: Bjørn Mork <bjorn@mork.no>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jim Baxter authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    aeca3a7 View commit details
    Browse the repository at this point in the history
  34. Merge tag 'mac80211-for-davem-2017-05-08' of git://git.kernel.org/pub…

    …/scm/linux/kernel/git/jberg/mac80211
    
    Johannes Berg says:
    
    ====================
    A couple more fixes:
     * don't try to authenticate during reconfiguration, which causes
       drivers to get confused
     * fix a kernel-doc warning for a recently merged change
     * fix MU-MIMO group configuration (relevant only for monitor mode)
     * more rate flags fix: remove stray RX_ENC_FLAG_40MHZ
     * fix IBSS probe response allocation size
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    29cee56 View commit details
    Browse the repository at this point in the history
  35. ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf

    For each netns (except init_net), we initialize its null entry
    in 3 places:
    
    1) The template itself, as we use kmemdup()
    2) Code around dst_init_metrics() in ip6_route_net_init()
    3) ip6_route_dev_notify(), which is supposed to initialize it after
       loopback registers
    
    Unfortunately the last one still happens in a wrong order because
    we expect to initialize net->ipv6.ip6_null_entry->rt6i_idev to
    net->loopback_dev's idev, thus we have to do that after we add
    idev to loopback. However, this notifier has priority == 0 same as
    ipv6_dev_notf, and ipv6_dev_notf is registered after
    ip6_route_dev_notifier so it is called actually after
    ip6_route_dev_notifier. This is similar to commit 2f46093
    ("ipv6: initialize route null entry in addrconf_init()") which
    fixes init_net.
    
    Fix it by picking a smaller priority for ip6_route_dev_notifier.
    Also, we have to release the refcnt accordingly when unregistering
    loopback_dev because device exit functions are called before subsys
    exit functions.
    
    Acked-by: David Ahern <dsahern@gmail.com>
    Tested-by: David Ahern <dsahern@gmail.com>
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    congwang authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    242d3a4 View commit details
    Browse the repository at this point in the history
  36. net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow …

    …control
    
    When users set flow control using ethtool the bits are set properly in the
    CPGMAC_SL MACCONTROL register, but the FIFO depth in the respective Port n
    Maximum FIFO Blocks (Pn_MAX_BLKS) registers remains set to the minimum size
    reset value. When receive flow control is enabled on a port, the port's
    associated FIFO block allocation must be adjusted. The port RX allocation
    must increase to accommodate the flow control runout. The TRM recommends
    numbers of 5 or 6.
    
    Hence, apply required Port FIFO configuration to
    Pn_MAX_BLKS.Pn_TX_MAX_BLKS=0xF and Pn_MAX_BLKS.Pn_RX_MAX_BLKS=0x5 during
    interface initialization.
    
    Cc: Schuyler Patton <spatton@ti.com>
    Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    grygoriyS authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    48f5bcc View commit details
    Browse the repository at this point in the history
  37. ide: use setup_timer

    Use setup_timer() instead of init_timer() to simplify the code.
    
    Signed-off-by: Geliang Tang <geliangtang@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    geliangtang authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    1a1df90 View commit details
    Browse the repository at this point in the history
  38. ide: don't call memcpy with the same source and destination

    The parisc architecture recently reimplemented the memcpy function and
    their reimplementation crashed when source and destination overlapped.
    
    The crash happened in the function ide_complete_cmd where memcpy is called
    with the same source and destination pointer. According to the C
    specification, memcpy behavior is undefined if the source and destination
    range overlaps. This patches fixes the undefined behavior.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Mikulas Patocka authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    acfead3 View commit details
    Browse the repository at this point in the history
  39. net: mdio-mux: bcm-iproc: call mdiobus_free() in error path

    If an error is encountered in mdio_mux_init(), the error path will call
    mdiobus_free().  Since mdiobus_register() has been called prior to
    mdio_mux_init(), the bus->state will not be MDIOBUS_UNREGISTERED.  This
    causes a BUG_ON() in mdiobus_free().  To correct this issue, add an
    error path for mdio_mux_init() which calls mdiobus_unregister() prior to
    mdiobus_free().
    
    Signed-off-by: Jon Mason <jon.mason@broadcom.com>
    Fixes: 98bc865 ("net: mdio-mux: Add MDIO mux driver for iProc SoCs")
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jon Mason authored and davem330 committed May 8, 2017
    Configuration menu
    Copy the full SHA
    922c60e View commit details
    Browse the repository at this point in the history

Commits on May 9, 2017

  1. mm, compaction: reorder fields in struct compact_control

    Patch series "try to reduce fragmenting fallbacks", v3.
    
    Last year, Johannes Weiner has reported a regression in page mobility
    grouping [1] and while the exact cause was not found, I've come up with
    some ways to improve it by reducing the number of allocations falling
    back to different migratetype and causing permanent fragmentation.
    
    The series was tested with mmtests stress-highalloc modified to do
    GFP_KERNEL order-4 allocations, on 4.9 with "mm, vmscan: fix zone
    balance check in prepare_kswapd_sleep" (without that, kcompactd indeed
    wasn't woken up) on UMA machine with 4GB memory.  There were 5 repeats
    of each run, as the extfrag stats are quite volatile (note the stats
    below are sums, not averages, as it was less perl hacking for me).
    
    Success rate are the same, already high due to the low allocation order
    used, so I'm not including them.
    
    Compaction stats:
    (the patches are stacked, and I haven't measured the non-functional-changes
    patches separately)
    
                                         patch 1     patch 2     patch 3     patch 4     patch 7     patch 8
      Compaction stalls                    22449       24680       24846       19765       22059       17480
      Compaction success                   12971       14836       14608       10475       11632        8757
      Compaction failures                   9477        9843       10238        9290       10426        8722
      Page migrate success               3109022     3370438     3312164     1695105     1608435     2111379
      Page migrate failure                911588     1149065     1028264     1112675     1077251     1026367
      Compaction pages isolated          7242983     8015530     7782467     4629063     4402787     5377665
      Compaction migrate scanned       980838938   987367943   957690188   917647238   947155598  1018922197
      Compaction free scanned          557926893   598946443   602236894   594024490   541169699   763651731
      Compaction cost                      10243       10578       10304        8286        8398        9440
    
    Compaction stats are mostly within noise until patch 4, which decreases
    the number of compactions, and migrations.  Part of that could be due to
    more pageblocks marked as unmovable, and async compaction skipping
    those.  This changes a bit with patch 7, but not so much.  Patch 8
    increases free scanner stats and migrations, which comes from the
    changed termination criteria.  Interestingly number of compactions
    decreases - probably the fully compacted pageblock satisfies multiple
    subsequent allocations, so it amortizes.
    
    Next comes the extfrag tracepoint, where "fragmenting" means that an
    allocation had to fallback to a pageblock of another migratetype which
    wasn't fully free (which is almost all of the fallbacks).  I have
    locally added another tracepoint for "Page steal" into
    steal_suitable_fallback() which triggers in situations where we are
    allowed to do move_freepages_block().  If we decide to also do
    set_pageblock_migratetype(), it's "Pages steal with pageblock" with
    break down for which allocation migratetype we are stealing and from
    which fallback migratetype.  The last part "due to counting" comes from
    patch 4 and counts the events where the counting of movable pages
    allowed us to change pageblock's migratetype, while the number of free
    pages alone wouldn't be enough to cross the threshold.
    
                                                           patch 1     patch 2     patch 3     patch 4     patch 7     patch 8
      Page alloc extfrag event                            10155066     8522968    10164959    15622080    13727068    13140319
      Extfrag fragmenting                                 10149231     8517025    10159040    15616925    13721391    13134792
      Extfrag fragmenting for unmovable                     159504      168500      184177       97835       70625       56948
      Extfrag fragmenting unmovable placed with movable     153613      163549      172693       91740       64099       50917
      Extfrag fragmenting unmovable placed with reclaim.      5891        4951       11484        6095        6526        6031
      Extfrag fragmenting for reclaimable                     4738        4829        6345        4822        5640        5378
      Extfrag fragmenting reclaimable placed with movable     1836        1902        1851        1579        1739        1760
      Extfrag fragmenting reclaimable placed with unmov.      2902        2927        4494        3243        3901        3618
      Extfrag fragmenting for movable                      9984989     8343696     9968518    15514268    13645126    13072466
      Pages steal                                           179954      192291      210880      123254       94545       81486
      Pages steal with pageblock                             22153       18943       20154       33562       29969       33444
      Pages steal with pageblock for unmovable               14350       12858       13256       20660       19003       20852
      Pages steal with pageblock for unmovable from mov.     12812       11402       11683       19072       17467       19298
      Pages steal with pageblock for unmovable from recl.     1538        1456        1573        1588        1536        1554
      Pages steal with pageblock for movable                  7114        5489        5965       11787       10012       11493
      Pages steal with pageblock for movable from unmov.      6885        5291        5541       11179        9525       10885
      Pages steal with pageblock for movable from recl.        229         198         424         608         487         608
      Pages steal with pageblock for reclaimable               689         596         933        1115         954        1099
      Pages steal with pageblock for reclaimable from unmov.   273         219         537         658         547         667
      Pages steal with pageblock for reclaimable from mov.     416         377         396         457         407         432
      Pages steal with pageblock due to counting                                                 11834       10075        7530
      ... for unmovable                                                                           8993        7381        4616
      ... for movable                                                                             2792        2653        2851
      ... for reclaimable                                                                           49          41          63
    
    What we can see is that "Extfrag fragmenting for unmovable" and "...
    placed with movable" drops with almost each patch, which is good as we
    are polluting less movable pageblocks with unmovable pages.
    
    The most significant change is patch 4 with movable page counting.  On
    the other hand it increases "Extfrag fragmenting for movable" by 50%.
    "Pages steal" drops though, so these movable allocation fallbacks find
    only small free pages and are not allowed to steal whole pageblocks
    back.  "Pages steal with pageblock" raises, because the patch increases
    the chances of pageblock migratetype changes to happen.  This affects
    all migratetypes.
    
    The summary is that patch 4 is not a clear win wrt these stats, but I
    believe that the tradeoff it makes is a good one.  There's less
    pollution of movable pageblocks by unmovable allocations.  There's less
    stealing between pageblock, and those that remain have higher chance of
    changing migratetype also the pageblock itself, so it should more
    faithfully reflect the migratetype of the pages within the pageblock.
    The increase of movable allocations falling back to unmovable pageblock
    might look dramatic, but those allocations can be migrated by compaction
    when needed, and other patches in the series (7-9) improve that aspect.
    
    Patches 7 and 8 continue the trend of reduced unmovable fallbacks and
    also reduce the impact on movable fallbacks from patch 4.
    
    [1] https://www.spinics.net/lists/linux-mm/msg114237.html
    
    This patch (of 8):
    
    While currently there are (mostly by accident) no holes in struct
    compact_control (on x86_64), but we are going to add more bool flags, so
    place them all together to the end of the structure.  While at it, just
    order all fields from largest to smallest.
    
    Link: http://lkml.kernel.org/r/20170307131545.28577-2-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f25ba6d View commit details
    Browse the repository at this point in the history
  2. mm, compaction: remove redundant watermark check in compact_finished()

    When detecting whether compaction has succeeded in forming a high-order
    page, __compact_finished() employs a watermark check, followed by an own
    search for a suitable page in the freelists.  This is not ideal for two
    reasons:
    
     - The watermark check also searches high-order freelists, but has a
       less strict criteria wrt fallback. It's therefore redundant and waste
       of cycles. This was different in the past when high-order watermark
       check attempted to apply reserves to high-order pages.
    
     - The watermark check might actually fail due to lack of order-0 pages.
       Compaction can't help with that, so there's no point in continuing
       because of that. It's possible that high-order page still exists and
       it terminates.
    
    This patch therefore removes the watermark check.  This should save some
    cycles and terminate compaction sooner in some cases.
    
    Link: http://lkml.kernel.org/r/20170307131545.28577-3-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    228d7e3 View commit details
    Browse the repository at this point in the history
  3. mm, page_alloc: split smallest stolen page in fallback

    The __rmqueue_fallback() function is called when there's no free page of
    requested migratetype, and we need to steal from a different one.
    
    There are various heuristics to make this event infrequent and reduce
    permanent fragmentation.  The main one is to try stealing from a
    pageblock that has the most free pages, and possibly steal them all at
    once and convert the whole pageblock.  Precise searching for such
    pageblock would be expensive, so instead the heuristics walks the free
    lists from MAX_ORDER down to requested order and assumes that the block
    with highest-order free page is likely to also have the most free pages
    in total.
    
    Chances are that together with the highest-order page, we steal also
    pages of lower orders from the same block.  But then we still split the
    highest order page.  This is wasteful and can contribute to
    fragmentation instead of avoiding it.
    
    This patch thus changes __rmqueue_fallback() to just steal the page(s)
    and put them on the freelist of the requested migratetype, and only
    report whether it was successful.  Then we pick (and eventually split)
    the smallest page with __rmqueue_smallest().  This all happens under
    zone lock, so nobody can steal it from us in the process.  This should
    reduce fragmentation due to fallbacks.  At worst we are only stealing a
    single highest-order page and waste some cycles by moving it between
    lists and then removing it, but fallback is not exactly hot path so that
    should not be a concern.  As a side benefit the patch removes some
    duplicate code by reusing __rmqueue_smallest().
    
    [vbabka@suse.cz: fix endless loop in the modified __rmqueue()]
      Link: http://lkml.kernel.org/r/59d71b35-d556-4fc9-ee2e-1574259282fd@suse.cz
    Link: http://lkml.kernel.org/r/20170307131545.28577-4-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    3bc48f9 View commit details
    Browse the repository at this point in the history
  4. mm, page_alloc: count movable pages when stealing from pageblock

    When stealing pages from pageblock of a different migratetype, we count
    how many free pages were stolen, and change the pageblock's migratetype
    if more than half of the pageblock was free.  This might be too
    conservative, as there might be other pages that are not free, but were
    allocated with the same migratetype as our allocation requested.
    
    While we cannot determine the migratetype of allocated pages precisely
    (at least without the page_owner functionality enabled), we can count
    pages that compaction would try to isolate for migration - those are
    either on LRU or __PageMovable().  The rest can be assumed to be
    MIGRATE_RECLAIMABLE or MIGRATE_UNMOVABLE, which we cannot easily
    distinguish.  This counting can be done as part of free page stealing
    with little additional overhead.
    
    The page stealing code is changed so that it considers free pages plus
    pages of the "good" migratetype for the decision whether to change
    pageblock's migratetype.
    
    The result should be more accurate migratetype of pageblocks wrt the
    actual pages in the pageblocks, when stealing from semi-occupied
    pageblocks.  This should help the efficiency of page grouping by
    mobility.
    
    In testing based on 4.9 kernel with stress-highalloc from mmtests
    configured for order-4 GFP_KERNEL allocations, this patch has reduced
    the number of unmovable allocations falling back to movable pageblocks
    by 47%.  The number of movable allocations falling back to other
    pageblocks are increased by 55%, but these events don't cause permanent
    fragmentation, so the tradeoff should be positive.  Later patches also
    offset the movable fallback increase to some extent.
    
    [akpm@linux-foundation.org: merge fix]
    Link: http://lkml.kernel.org/r/20170307131545.28577-5-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    02aa0cd View commit details
    Browse the repository at this point in the history
  5. mm, compaction: change migrate_async_suitable() to suitable_migration…

    …_source()
    
    Preparation for making the decisions more complex and depending on
    compact_control flags.  No functional change.
    
    Link: http://lkml.kernel.org/r/20170307131545.28577-6-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    b682deb View commit details
    Browse the repository at this point in the history
  6. mm, compaction: add migratetype to compact_control

    Preparation patch.  We are going to need migratetype at lower layers
    than compact_zone() and compact_finished().
    
    Link: http://lkml.kernel.org/r/20170307131545.28577-7-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d39773a View commit details
    Browse the repository at this point in the history
  7. mm, compaction: restrict async compaction to pageblocks of same migra…

    …tetype
    
    The migrate scanner in async compaction is currently limited to
    MIGRATE_MOVABLE pageblocks.  This is a heuristic intended to reduce
    latency, based on the assumption that non-MOVABLE pageblocks are
    unlikely to contain movable pages.
    
    However, with the exception of THP's, most high-order allocations are
    not movable.  Should the async compaction succeed, this increases the
    chance that the non-MOVABLE allocations will fallback to a MOVABLE
    pageblock, making the long-term fragmentation worse.
    
    This patch attempts to help the situation by changing async direct
    compaction so that the migrate scanner only scans the pageblocks of the
    requested migratetype.  If it's a non-MOVABLE type and there are such
    pageblocks that do contain movable pages, chances are that the
    allocation can succeed within one of such pageblocks, removing the need
    for a fallback.  If that fails, the subsequent sync attempt will ignore
    this restriction.
    
    In testing based on 4.9 kernel with stress-highalloc from mmtests
    configured for order-4 GFP_KERNEL allocations, this patch has reduced
    the number of unmovable allocations falling back to movable pageblocks
    by 30%.  The number of movable allocations falling back is reduced by
    12%.
    
    Link: http://lkml.kernel.org/r/20170307131545.28577-8-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    282722b View commit details
    Browse the repository at this point in the history
  8. mm, compaction: finish whole pageblock to reduce fragmentation

    The main goal of direct compaction is to form a high-order page for
    allocation, but it should also help against long-term fragmentation when
    possible.
    
    Most lower-than-pageblock-order compactions are for non-movable
    allocations, which means that if we compact in a movable pageblock and
    terminate as soon as we create the high-order page, it's unlikely that
    the fallback heuristics will claim the whole block.  Instead there might
    be a single unmovable page in a pageblock full of movable pages, and the
    next unmovable allocation might pick another pageblock and increase
    long-term fragmentation.
    
    To help against such scenarios, this patch changes the termination
    criteria for compaction so that the current pageblock is finished even
    though the high-order page already exists.  Note that it might be
    possible that the high-order page formed elsewhere in the zone due to
    parallel activity, but this patch doesn't try to detect that.
    
    This is only done with sync compaction, because async compaction is
    limited to pageblock of the same migratetype, where it cannot result in
    a migratetype fallback.  (Async compaction also eagerly skips
    order-aligned blocks where isolation fails, which is against the goal of
    migrating away as much of the pageblock as possible.)
    
    As a result of this patch, long-term memory fragmentation should be
    reduced.
    
    In testing based on 4.9 kernel with stress-highalloc from mmtests
    configured for order-4 GFP_KERNEL allocations, this patch has reduced
    the number of unmovable allocations falling back to movable pageblocks
    by 20%.  The number
    
    Link: http://lkml.kernel.org/r/20170307131545.28577-9-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    baf6a9a View commit details
    Browse the repository at this point in the history
  9. fs/proc/inode.c: remove cast from memory allocation

    Coccinelle emits this warning:
    
      WARNING: casting value returned by memory allocation function to (struct proc_inode *) is useless.
    
    Remove unnecessary cast.
    
    Link: http://lkml.kernel.org/r/1487745720-16967-1-git-send-email-me@tobin.cc
    Signed-off-by: Tobin C. Harding <me@tobin.cc>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tcharding authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f245e1c View commit details
    Browse the repository at this point in the history
  10. proc/sysctl: fix the int overflow for jiffies conversion

    do_proc_dointvec_jiffies_conv() uses LONG_MAX/HZ as the max value to
    avoid overflow.  But actually the *valp is int type, so it still causes
    overflow.
    
    For example,
    
      echo 2147483647 > ./sys/net/ipv4/tcp_keepalive_time
    
    Then,
    
      cat ./sys/net/ipv4/tcp_keepalive_time
    
    The output is "-1", it is not expected.
    
    Now use INT_MAX/HZ as the max value instead LONG_MAX/HZ to fix it.
    
    Link: http://lkml.kernel.org/r/1490109532-9228-1-git-send-email-fgao@ikuai8.com
    Signed-off-by: Gao Feng <fgao@ikuai8.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    gfreewind authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    6325945 View commit details
    Browse the repository at this point in the history
  11. drivers/virt/fsl_hypervisor.c: use get_user_pages_unlocked()

    Moving from get_user_pages() to get_user_pages_unlocked() simplifies the
    code and takes advantage of VM_FAULT_RETRY functionality when faulting
    in pages.
    
    Link: http://lkml.kernel.org/r/20161101194332.23961-1-lstoakes@gmail.com
    Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Kumar Gala <galak@kernel.crashing.org>
    Cc: Mihai Caraman <mihai.caraman@freescale.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    lorenzo-stoakes authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    3d88936 View commit details
    Browse the repository at this point in the history
  12. jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_…

    …in_smp
    
    jiffies_64 is defined in kernel/time/timer.c with
    ____cacheline_aligned_in_smp, however this macro is not part of the
    declaration of jiffies and jiffies_64 in jiffies.h.
    
    As a result clang generates the following warning:
    
      kernel/time/timer.c:57:26: error: section does not match previous declaration [-Werror,-Wsection]
      __visible u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
                               ^
      include/linux/cache.h:39:36: note: expanded from macro '__cacheline_aligned_in_smp'
                                         ^
      include/linux/cache.h:34:4: note: expanded from macro '__cacheline_aligned'
                       __section__(".data..cacheline_aligned")))
                       ^
      include/linux/jiffies.h:77:12: note: previous attribute is here
      extern u64 __jiffy_data jiffies_64;
                 ^
      include/linux/jiffies.h:70:38: note: expanded from macro '__jiffy_data'
    
    Link: http://lkml.kernel.org/r/20170403190200.70273-1-mka@chromium.org
    Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
    Cc: "Jason A . Donenfeld" <Jason@zx2c4.com>
    Cc: Grant Grundler <grundler@chromium.org>
    Cc: Michael Davidson <md@google.com>
    Cc: Greg Hackmann <ghackmann@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Matthias Kaehlcke authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    7c30f35 View commit details
    Browse the repository at this point in the history
  13. make help: add tools help target

    Add a top-level Makefile help target for Userspace tools.
    
    Also make each help "heading" end with a colon ':'.
    
    Link: http://lkml.kernel.org/r/55c986ff-3966-3e47-2984-7349da2cce51@infradead.org
    Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    rddunlap authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    31b8cc8 View commit details
    Browse the repository at this point in the history
  14. kernel/hung_task.c: defer showing held locks

    When I was running my testcase which may block hundreds of threads on fs
    locks, I got lockup due to output from debug_show_all_locks() added by
    commit b2d4c2e ("locking/hung_task: Show all locks").
    
    For example, if 1000 threads were blocked in TASK_UNINTERRUPTIBLE state
    and 500 out of 1000 threads hold some lock, debug_show_all_locks() from
    for_each_process_thread() loop will report locks held by 500 threads for
    1000 times.  This is a too much noise.
    
    In order to make sure rcu_lock_break() is called frequently, we should
    avoid calling debug_show_all_locks() from for_each_process_thread() loop
    because debug_show_all_locks() effectively calls for_each_process_thread()
    loop.  Let's defer calling debug_show_all_locks() till before panic() or
    leaving for_each_process_thread() loop.
    
    Link: http://lkml.kernel.org/r/1489296834-60436-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp
    Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Reviewed-by: Vegard Nossum <vegard.nossum@oracle.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Tetsuo Handa authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    780cbcf View commit details
    Browse the repository at this point in the history
  15. drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflo…

    …w tests
    
    The "DIV_ROUND_UP(size, PAGE_SIZE)" operation can overflow if "size" is
    more than ULLONG_MAX - PAGE_SIZE.
    
    Link: http://lkml.kernel.org/r/20170322111950.GA11279@mwanda
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Cc: Jorgen Hansen <jhansen@vmware.com>
    Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Dan Carpenter authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    146180c View commit details
    Browse the repository at this point in the history
  16. drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead o…

    …f IS_ERR()
    
    c2port_device_register() never returns NULL, it uses error pointers.
    
    Link: http://lkml.kernel.org/r/20170412083321.GC3250@mwanda
    Fixes: 65131cd ("c2port: add c2port support for Eurotech Duramar 2150")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Rodolfo Giometti <giometti@linux.it>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Dan Carpenter authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8128a31 View commit details
    Browse the repository at this point in the history
  17. Revert "lib/test_sort.c: make it explicitly non-modular"

    Patch series "lib: add module support to sort tests".
    
    This patch series allows to compile the array-based and linked list sort
    test code either to loadable modules, or builtin into the kernel.
    
    It's very valuable to have modular tests, so you can run them just by
    insmodding the test modules, instead of needing a separate kernel that
    runs them at boot.
    
    This patch (of 3):
    
    This reverts commit 8893f51.
    
    It's very valuable to have modular tests, so you can run them just by
    insmodding the test modules, instead of needing a separate kernel that
    runs them at boot.
    
    Link: http://lkml.kernel.org/r/1488287219-15832-2-git-send-email-geert@linux-m68k.org
    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    geertu authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    ebd03a9 View commit details
    Browse the repository at this point in the history
  18. lib: add module support to array-based sort tests

    Allow to compile the array-based sort test code either to a loadable
    module, or builtin into the kernel.
    
    Link: http://lkml.kernel.org/r/1488287219-15832-3-git-send-email-geert@linux-m68k.org
    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    geertu authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    5c4e679 View commit details
    Browse the repository at this point in the history
  19. lib: add module support to linked list sorting tests

    Extract the linked list sorting test code into its own source file, to
    allow to compile it either to a loadable module, or builtin into the
    kernel.
    
    Link: http://lkml.kernel.org/r/1488287219-15832-4-git-send-email-geert@linux-m68k.org
    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    geertu authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e327fd7 View commit details
    Browse the repository at this point in the history
  20. firmware/Makefile: force recompilation if makefile changes

    If you modify the target asm we currently do not force the recompilation
    of the firmware files.  The target asm is in the firmware/Makefile, peg
    this file as a dependency to require re-compilation of firmware targets
    when the asm changes.
    
    Link: http://lkml.kernel.org/r/20170123150727.4883-1-mcgrof@kernel.org
    Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
    Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
    Cc: Michal Marek <mmarek@suse.com>
    Cc: Ming Lei <ming.lei@canonical.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Tom Gundersen <teg@jklm.no>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    mcgrof authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    0cd5246 View commit details
    Browse the repository at this point in the history
  21. checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks

    Config EXPERIMENTAL has been removed from kernel in 2013 (see commit
    3d374d0: "final removal of CONFIG_EXPERIMENTAL"), there is no any
    reason to do these checks now.
    
    Link: http://lkml.kernel.org/r/1488234097-20119-1-git-send-email-ruslan.bilovol@gmail.com
    Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
    Acked-by: Kees Cook <keescook@chromium.org>
    Acked-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    rbilovol authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    cd8618a View commit details
    Browse the repository at this point in the history
  22. checkpatch: add ability to find bad uses of vsprintf %p<foo> extensions

    %pK was at least once misused at %pk in an out-of-tree module.  This
    lead to some security concerns.  Add the ability to track single and
    multiple line statements for misuses of %p<foo>.
    
    [akpm@linux-foundation.org: add helpful comment into lib/vsprintf.c]
    [akpm@linux-foundation.org: text tweak]
    Link: http://lkml.kernel.org/r/163a690510e636a23187c0dc9caa09ddac6d4cde.1488228427.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Acked-by: Kees Cook <keescook@chromium.org>
    Acked-by: William Roberts <william.c.roberts@intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    0b52376 View commit details
    Browse the repository at this point in the history
  23. checkpatch: improve EMBEDDED_FUNCTION_NAME test

    The existing behavior relies on patch context to identify function
    declarations.  Add the ability to find function declarations when there
    is an open brace in column 1.
    
    This finds function declarations only in specific single line forms
    where the function name is on a single line like:
    
      int foo(args...)
      {
    
    and
    
      int
      foo(args...)
      {
    
    It does not recognize function declarations like:
    
      int foo(int bar,
              int baz)
      {
    
    Link: http://lkml.kernel.org/r/738d74bbbe1a06b80f11ed504818107c68903095.1488155636.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    4dbed76 View commit details
    Browse the repository at this point in the history
  24. checkpatch: allow space leading blank lines in email headers

    Allow a leading space and otherwise blank link in the email headers as
    it can be a line wrapped Spamassassin multiple line string or any other
    valid rfc 2822/5322 email header.
    
    The line with space causes checkpatch to erroneously think that it's in
    the content body, as opposed to headers and thus flag a mail header as
    an unwrapped long comment line.
    
    Link: http://lkml.kernel.org/r/d75a9f0b78b3488078429f4037d9fff3bdfa3b78.1490247180.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>Reported-by: Darren Hart (VMware) <dvhart@infradead.org>
    Tested-by: Darren Hart (VMware) <dvhart@infradead.org>
    Reviewed-by: Darren Hart (VMware) <dvhart@vmware.com>
    Original-patch-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    eb3a58d View commit details
    Browse the repository at this point in the history
  25. checkpatch: avoid suggesting struct definitions should be const

    Many structs are generally used const and there is a known list of these
    structs.
    
    struct definitions should not be generally be declared const.
    
    Add a test for the lack of an open brace immediately after the struct to
    avoid definitions.
    
    This avoids the false positive "struct foo should normally be const"
    message only when the open brace is on the same line as the definition.
    
    Link: http://lkml.kernel.org/r/0dce709150d712e66f1b90b03827634b53b28085.1491845946.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Cc: Arthur Brainville <ybalrid@ybalrid.info>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d9190e4 View commit details
    Browse the repository at this point in the history
  26. checkpatch: improve MULTISTATEMENT_MACRO_USE_DO_WHILE test

    The logic currrently misses macros that start with an if statement.
    
    e.g.:    #define foo(bar)   if (bar) baz;
    
    Add a test for macro content that starts with if
    
    Link: http://lkml.kernel.org/r/a9d41aafe1673889caf1a9850208fb7fd74107a0.1491783914.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Reported-by: Andreas Mohr <andi@lisas.de>
    Original-patch-by: Alfonso Lima <alfonsolimaastor@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e795556 View commit details
    Browse the repository at this point in the history
  27. checkpatch: clarify the EMBEDDED_FUNCTION_NAME message

    Try to make the conversion of embedded function names to "%s: ", __func__
    a bit clearer.
    
    Add a bit more information to the comment describing the test too.
    
    Link: http://lkml.kernel.org/r/38f5d32f0aec1cd98cb9ceeedd6a736cc9a802db.1491759835.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e4b7d30 View commit details
    Browse the repository at this point in the history
  28. checkpatch: special audit for revert commit line

    Currently checkpatch.pl does not recognize git's default commit revert
    message and will complain about the hash format.  Add special audit for
    revert commit message line to fix it.
    
    Link: http://lkml.kernel.org/r/20170411191532.74381-1-wvw@google.com
    Signed-off-by: Wei Wang <wvw@google.com>
    Acked-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    weivincewang authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e882dbf View commit details
    Browse the repository at this point in the history
  29. checkpatch: improve k.alloc with multiplication and sizeof test

    Find multi-line uses of k.alloc by using the $stat variable and not the
    $line variable.  This can still --fix only the single line variant
    though.
    
    Link: http://lkml.kernel.org/r/3f4b23d37cd4c7d8628eefc25afe83ba8fb3ab55.1493167076.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    1b4a2ed View commit details
    Browse the repository at this point in the history
  30. checkpatch: add --typedefsfile

    When using checkpatch on out-of-tree code, it may occur that some
    project-specific types are used, which will cause spurious warnings.
    Add the --typedefsfile option as a way to extend the known types and
    deal with this issue.
    
    This was developed for OP-TEE [1].  We run a Travis job on all pull
    requests [2], and checkpatch is part of that.  The typical false warning
    we get on a regular basis is with some pointers to functions returning
    TEE_Result [3], which is a typedef from the GlobalPlatform APIs.  We
    consider it is acceptable to use GP types in the OP-TEE core
    implementation, that's why this patch would be helpful for us.
    
    [1] https://github.com/OP-TEE/optee_os
    [2] https://travis-ci.org/OP-TEE/optee_os/builds
    [3] https://travis-ci.org/OP-TEE/optee_os/builds/193355335#L1733
    
    Link: http://lkml.kernel.org/r/ba1124d6dfa599bb0dd1d8919dd45dd09ce541a4.1492702192.git.jerome.forissier@linaro.org
    Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
    Cc: Joe Perches <joe@perches.com>
    Cc: Andy Whitcroft <apw@canonical.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    jforissier authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    75ad8c5 View commit details
    Browse the repository at this point in the history
  31. checkpatch: improve the embedded function name test for patch contexts

    The current test works only for a single patch context as it is done in
    the foreach ($rawlines) loop that precedes the loop where the actual
    $context_function variable is used.
    
    Move the set of $context_function into the foreach (@lines) loop where
    it is useful for each patch context.
    
    Link: http://lkml.kernel.org/r/6c675a31c74fbfad4fc45b9f462303d60ca2a283.1493486091.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    74fd4f3 View commit details
    Browse the repository at this point in the history
  32. checkpatch: improve the SUSPECT_CODE_INDENT test

    The current SUSPECT_CODE_INDENT test does not recognize several
    defective code style defects where code following a logical test is
    inappropriately indented.
    
    Before this patch, for code like:
    
    	if (foo)
    	bar();
    
    checkpatch would not emit a warning.
    
    Improve the test to warn when code after a logical test has the same
    indentation as the logical test.
    
    Perform the same indentation test for "else" blocks too.
    
    Link: http://lkml.kernel.org/r/df2374b68c4a68af2b7ef08afe486584811f610a.1493683942.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f6950a7 View commit details
    Browse the repository at this point in the history
  33. reiserfs: use designated initializers

    Prepare to mark sensitive kernel structures for randomization by making
    sure they're using designated initializers.  These were identified
    during allyesconfig builds of x86, arm, and arm64, with most initializer
    fixes extracted from grsecurity.
    
    Link: http://lkml.kernel.org/r/20170329210419.GA40066@beast
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Cc: Jan Kara <jack@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kees authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    7fe6a42 View commit details
    Browse the repository at this point in the history
  34. fork: free vmapped stacks in cache when cpus are offline

    Using virtually mapped stack, kernel stacks are allocated via vmalloc.
    
    In the current implementation, two stacks per cpu can be cached when
    tasks are freed and the cached stacks are used again in task
    duplications.  But the cached stacks may remain unfreed even when cpu
    are offline.  By adding a cpu hotplug callback to free the cached stacks
    when a cpu goes offline, the pages of the cached stacks are not wasted.
    
    Link: http://lkml.kernel.org/r/1487076043-17802-1-git-send-email-hoeun.ryu@gmail.com
    Signed-off-by: Hoeun Ryu <hoeun.ryu@gmail.com>
    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Mateusz Guzik <mguzik@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    hoeun authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    19659c5 View commit details
    Browse the repository at this point in the history
  35. cpumask: make "nr_cpumask_bits" unsigned

    Bit searching functions accept "unsigned long" indices but
    "nr_cpumask_bits" is "int" which is signed, so inevitable sign
    extensions occur on x86_64.  Those MOVSX are #1 MOVSX bloat by number of
    uses across whole kernel.
    
    Change "nr_cpumask_bits" to unsigned, this number can't be negative
    after all.  It allows to do implicit zero-extension on x86_64 without
    MOVSX.
    
    Change signed comparisons into unsigned comparisons where necessary.
    
    Other uses looks fine because it is either argument passed to a function
    or comparison is already unsigned.
    
    Net win on allyesconfig type of kernel: ~2.8 KB (!)
    
    	add/remove: 0/0 grow/shrink: 8/725 up/down: 93/-2926 (-2833)
    	function                                     old     new   delta
    	xen_exit_mmap                                691     735     +44
    	qstat_read                                   426     440     +14
    	__cpufreq_cooling_register                  1678    1687      +9
    	trace_rb_cpu_prepare                         447     455      +8
    	vermagic                                      54      60      +6
    	nfp_driver_version                            54      60      +6
    	rcu_torture_stats_print                     1147    1151      +4
    	find_next_push_cpu                           267     269      +2
    	xen_irq_resume                               961     960      -1
    				...
    	init_vp_index                                946     906     -40
    	od_set_powersave_bias                        328     281     -47
    	power_cpu_exit                               193     139     -54
    	arch_show_interrupts                        3538    3484     -54
    	select_idle_sibling                         1558    1471     -87
    	Total: Before=158358910, After=158356077, chg -0.00%
    
    Same arguments apply to "nr_cpu_ids" but I haven't yet found enough
    courage to delve into this issue (and proper fix may require new type
    "cpu_t" which is whole separate story).
    
    Link: http://lkml.kernel.org/r/20170309205322.GA1728@avx2
    Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Alexey Dobriyan authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c311c79 View commit details
    Browse the repository at this point in the history
  36. crash: move crashkernel parsing and vmcore related code under CONFIG_…

    …CRASH_CORE
    
    Patch series "kexec/fadump: remove dependency with CONFIG_KEXEC and
    reuse crashkernel parameter for fadump", v4.
    
    Traditionally, kdump is used to save vmcore in case of a crash.  Some
    architectures like powerpc can save vmcore using architecture specific
    support instead of kexec/kdump mechanism.  Such architecture specific
    support also needs to reserve memory, to be used by dump capture kernel.
    crashkernel parameter can be a reused, for memory reservation, by such
    architecture specific infrastructure.
    
    This patchset removes dependency with CONFIG_KEXEC for crashkernel
    parameter and vmcoreinfo related code as it can be reused without kexec
    support.  Also, crashkernel parameter is reused instead of
    fadump_reserve_mem to reserve memory for fadump.
    
    The first patch moves crashkernel parameter parsing and vmcoreinfo
    related code under CONFIG_CRASH_CORE instead of CONFIG_KEXEC_CORE.  The
    second patch reuses the definitions of append_elf_note() & final_note()
    functions under CONFIG_CRASH_CORE in IA64 arch code.  The third patch
    removes dependency on CONFIG_KEXEC for firmware-assisted dump (fadump)
    in powerpc.  The next patch reuses crashkernel parameter for reserving
    memory for fadump, instead of the fadump_reserve_mem parameter.  This
    has the advantage of using all syntaxes crashkernel parameter supports,
    for fadump as well.  The last patch updates fadump kernel documentation
    about use of crashkernel parameter.
    
    This patch (of 5):
    
    Traditionally, kdump is used to save vmcore in case of a crash.  Some
    architectures like powerpc can save vmcore using architecture specific
    support instead of kexec/kdump mechanism.  Such architecture specific
    support also needs to reserve memory, to be used by dump capture kernel.
    crashkernel parameter can be a reused, for memory reservation, by such
    architecture specific infrastructure.
    
    But currently, code related to vmcoreinfo and parsing of crashkernel
    parameter is built under CONFIG_KEXEC_CORE.  This patch introduces
    CONFIG_CRASH_CORE and moves the above mentioned code under this config,
    allowing code reuse without dependency on CONFIG_KEXEC.  There is no
    functional change with this patch.
    
    Link: http://lkml.kernel.org/r/149035338104.6881.4550894432615189948.stgit@hbathini.in.ibm.com
    Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
    Acked-by: Dave Young <dyoung@redhat.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Hari Bathini authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    692f66f View commit details
    Browse the repository at this point in the history
  37. ia64: reuse append_elf_note() and final_note() functions

    Get rid of multiple definitions of append_elf_note() & final_note()
    functions.  Reuse these functions compiled under CONFIG_CRASH_CORE Also,
    define Elf_Word and use it instead of generic u32 or the more specific
    Elf64_Word.
    
    Link: http://lkml.kernel.org/r/149035342324.6881.11667840929850361402.stgit@hbathini.in.ibm.com
    Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
    Acked-by: Dave Young <dyoung@redhat.com>
    Acked-by: Tony Luck <tony.luck@intel.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Hari Bathini authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    51dbd92 View commit details
    Browse the repository at this point in the history
  38. powerpc/fadump: remove dependency with CONFIG_KEXEC

    Now that crashkernel parameter parsing and vmcoreinfo related code is
    moved under CONFIG_CRASH_CORE instead of CONFIG_KEXEC_CORE, remove
    dependency with CONFIG_KEXEC for CONFIG_FA_DUMP.  While here, get rid of
    definitions of fadump_append_elf_note() & fadump_final_note() functions
    to reuse similar functions compiled under CONFIG_CRASH_CORE.
    
    Link: http://lkml.kernel.org/r/149035343956.6881.1536459326017709354.stgit@hbathini.in.ibm.com
    Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
    Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Acked-by: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Dave Young <dyoung@redhat.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Hari Bathini authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    22bd017 View commit details
    Browse the repository at this point in the history
  39. powerpc/fadump: reuse crashkernel parameter for fadump memory reserva…

    …tion
    
    fadump supports specifying memory to reserve for fadump's crash kernel
    with fadump_reserve_mem kernel parameter.  This parameter currently
    supports passing a fixed memory size, like fadump_reserve_mem=<size>
    only.  This patch aims to add support for other syntaxes like
    range-based memory size
    <range1>:<size1>[,<range2>:<size2>,<range3>:<size3>,...] which allows
    using the same parameter to boot the kernel with different system RAM
    sizes.
    
    As crashkernel parameter already supports the above mentioned syntaxes,
    this patch deprecates fadump_reserve_mem parameter and reuses
    crashkernel parameter instead, to specify memory for fadump's crash
    kernel memory reservation as well.  If any offset is provided in
    crashkernel parameter, it will be ignored in case of fadump, as fadump
    reserves memory at end of RAM.
    
    Advantages using crashkernel parameter instead of fadump_reserve_mem
    parameter are one less kernel parameter overall, code reuse and support
    for multiple syntaxes to specify memory.
    
    Suggested-by: Dave Young <dyoung@redhat.com>
    Link: http://lkml.kernel.org/r/149035346749.6881.911095631212975718.stgit@hbathini.in.ibm.com
    Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
    Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Acked-by: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Dave Young <dyoung@redhat.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Hari Bathini authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    11550dc View commit details
    Browse the repository at this point in the history
  40. powerpc/fadump: update documentation about crashkernel parameter reuse

    As we are reusing crashkernel parameter instead of fadump_reserve_mem
    parameter to specify the memory to reserve for fadump's crash kernel,
    update the documentation accordingly.
    
    Link: http://lkml.kernel.org/r/149035347559.6881.14224829694291758581.stgit@hbathini.in.ibm.com
    Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
    Acked-by: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Dave Young <dyoung@redhat.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Hari Bathini authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    92019ef View commit details
    Browse the repository at this point in the history
  41. pidns: disable pid allocation if pid_ns_prepare_proc() is failed in a…

    …lloc_pid()
    
    alloc_pidmap() advances pid_namespace::last_pid.  When first pid
    allocation fails, then next created process will have pid 2 and
    pid_ns_prepare_proc() won't be called.  So, pid_namespace::proc_mnt will
    never be initialized (not to mention that there won't be a child
    reaper).
    
    I saw crash stack of such case on kernel 3.10:
    
        BUG: unable to handle kernel NULL pointer dereference at (null)
        IP: proc_flush_task+0x8f/0x1b0
        Call Trace:
            release_task+0x3f/0x490
            wait_consider_task.part.10+0x7ff/0xb00
            do_wait+0x11f/0x280
            SyS_wait4+0x7d/0x110
    
    We may fix this by restore of last_pid in 0 or by prohibiting of futher
    allocations.  Since there was a similar issue in Oleg Nesterov's commit
    314a8ad ("pidns: fix free_pid() to handle the first fork failure").
    and it was fixed via prohibiting allocation, let's follow this way, and
    do the same.
    
    Link: http://lkml.kernel.org/r/149201021004.4863.6762095011554287922.stgit@localhost.localdomain
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Andrei Vagin <avagin@virtuozzo.com>
    Cc: Andreas Gruenbacher <agruenba@redhat.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Paul Moore <paul@paul-moore.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Serge Hallyn <serge@hallyn.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Kirill Tkhai authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8896c23 View commit details
    Browse the repository at this point in the history
  42. ns: allow ns_entries to have custom symlink content

    Patch series "Expose task pid_ns_for_children to userspace".
    
    pid_ns_for_children set by a task is known only to the task itself, and
    it's impossible to identify it from outside.
    
    It's a big problem for checkpoint/restore software like CRIU, because it
    can't correctly handle tasks, that do setns(CLONE_NEWPID) in proccess of
    their work.  If they have a custom pid_ns_for_children before dump, they
    must have the same ns after restore.  Otherwise, restored task bumped
    into enviroment it does not expect.
    
    This patchset solves the problem.  It exposes pid_ns_for_children to ns
    directory in standard way with the name "pid_for_children":
    
      ~# ls /proc/5531/ns -l | grep pid
      lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid -> pid:[4026531836]
      lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid_for_children -> pid:[4026532286]
    
    This patch (of 2):
    
    Make possible to have link content prefix yyy different from the link
    name xxx:
    
      $ readlink /proc/[pid]/ns/xxx
      yyy:[4026531838]
    
    This will be used in next patch.
    
    Link: http://lkml.kernel.org/r/149201120318.6007.7362655181033883000.stgit@localhost.localdomain
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
    Acked-by: Andrei Vagin <avagin@virtuozzo.com>
    Cc: Andreas Gruenbacher <agruenba@redhat.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Paul Moore <paul@paul-moore.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Serge Hallyn <serge@hallyn.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Kirill Tkhai authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    25b14e9 View commit details
    Browse the repository at this point in the history
  43. pidns: expose task pid_ns_for_children to userspace

    pid_ns_for_children set by a task is known only to the task itself, and
    it's impossible to identify it from outside.
    
    It's a big problem for checkpoint/restore software like CRIU, because it
    can't correctly handle tasks, that do setns(CLONE_NEWPID) in proccess of
    their work.
    
    This patch solves the problem, and it exposes pid_ns_for_children to ns
    directory in standard way with the name "pid_for_children":
    
      ~# ls /proc/5531/ns -l | grep pid
      lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid -> pid:[4026531836]
      lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid_for_children -> pid:[4026532286]
    
    Link: http://lkml.kernel.org/r/149201123914.6007.2187327078064239572.stgit@localhost.localdomain
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    Cc: Andrei Vagin <avagin@virtuozzo.com>
    Cc: Andreas Gruenbacher <agruenba@redhat.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Paul Moore <paul@paul-moore.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Serge Hallyn <serge@hallyn.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Kirill Tkhai authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    eaa0d19 View commit details
    Browse the repository at this point in the history
  44. taskstats: add e/u/stime for TGID command

    The elapsed time, user CPU time and system CPU time for the thread group
    status request are presently left at zero.  Fill these in.
    
    [akpm@linux-foundation.org: run ktime_get_ns() a single time]
    [akpm@linux-foundation.org: include linux/sched/cputime.h for task_cputime()]
    Link: http://lkml.kernel.org/r/1488508424-12322-1-git-send-email-xiao.zhang@windriver.com
    Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
    Cc: Balbir Singh <bsingharora@gmail.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    xzhang1 authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8c73342 View commit details
    Browse the repository at this point in the history
  45. kcov: simplify interrupt check

    in_interrupt() semantics are confusing and wrong for most users as it
    also returns true when bh is disabled.  Thus we open coded a proper
    check for interrupts in __sanitizer_cov_trace_pc() with a lengthy
    explanatory comment.
    
    Use the new in_task() predicate instead.
    
    Link: http://lkml.kernel.org/r/20170321091026.139655-1-dvyukov@google.com
    Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
    Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
    Cc: James Morse <james.morse@arm.com>
    Cc: Alexander Popov <alex.popov@linux.com>
    Cc: Andrey Konovalov <andreyknvl@google.com>
    Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    dvyukov authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f61e869 View commit details
    Browse the repository at this point in the history
  46. lib/fault-inject.c: use correct check for interrupts

    in_interrupt() also returns true when bh is disabled in task context.
    That's not what fail_task() wants to check.  Use the new in_task()
    predicate that does the right thing.
    
    Link: http://lkml.kernel.org/r/20170321091805.140676-1-dvyukov@google.com
    Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
    Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    dvyukov authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f2ad37d View commit details
    Browse the repository at this point in the history
  47. lib/zlib_inflate/inftrees.c: fix potential buffer overflow

    smatch says:
    
      WARNING: please, no spaces at the start of a line
      #30: FILE: lib/zlib_inflate/inftrees.c:112:
      +    for (min = 1; min < MAXBITS; min++)$
    
      total: 0 errors, 1 warnings, 8 lines checked
    
    NOTE: For some of the reported defects, checkpatch may be able to
          mechanically convert to the typical style using --fix or --fix-inplace.
    
    ./patches/zlib-inflate-fix-potential-buffer-overflow.patch has style problems, please review.
    
    NOTE: If any of the errors are false positives, please report
          them to the maintainer, see CHECKPATCH in MAINTAINERS.
    
    Please run checkpatch prior to sending patches
    
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    groeck authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    da5e108 View commit details
    Browse the repository at this point in the history
  48. initramfs: provide a way to ignore image provided by bootloader

    Many "embedded" architectures provide CMDLINE_FORCE to allow the kernel
    to override the command line provided by an inflexible bootloader.
    However there is currrently no way for the kernel to override the
    initramfs image provided by the bootloader meaning there are still ways
    for bootloaders to make things difficult for us.
    
    Fix this by introducing INITRAMFS_FORCE which can prevent the kernel
    from loading the bootloader supplied image.
    
    We use CMDLINE_FORCE (and its friend CMDLINE_EXTEND) to imply that the
    system has an inflexible bootloader.  This allow us to avoid presenting
    this config option to users of systems where inflexible bootloaders
    aren't usually a problem.
    
    Link: http://lkml.kernel.org/r/20170217121940.30126-1-daniel.thompson@linaro.org
    Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    daniel-thompson authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    cff75e0 View commit details
    Browse the repository at this point in the history
  49. initramfs: use vfs_stat/lstat directly

    sys_newlstat is a system call implementation that is meant for user
    space, and that copies kernel-internal data structure to the user
    format, which is not needed for in-kernel users.
    
    Further, as we rearrange the system call implementation so we can extend
    it with 64-bit time_t, the prototype for sys_newlstat changes.
    
    This changes the initramfs code to use vfs_lstat directly, to get it out
    of the way of the time_t changes, and make it slightly more efficient in
    the process.  Along the same lines we also replace sys_stat and
    sys_stat64 with vfs_stat.
    
    Link: http://lkml.kernel.org/r/20170314214932.4052842-1-arnd@arndb.de
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    arndb authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    046aa12 View commit details
    Browse the repository at this point in the history
  50. ipc/shm: some shmat cleanups

    Clean up early flag and address some minutia.
    
    Link: http://lkml.kernel.org/r/1486673582-6979-3-git-send-email-dave@stgolabs.net
    Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
    Cc: Manfred Spraul <manfred@colorfullife.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Davidlohr Bueso authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f0cb880 View commit details
    Browse the repository at this point in the history
  51. sysv,ipc: cacheline align kern_ipc_perm

    Assign 'struct kern_ipc_perm' its own cacheline to avoid false sharing
    with sysv ipc calls.
    
    While the structure itself is rather read-mostly throughout the lifespan
    of ipc, the spinlock causes most of the invalidations.  One example is
    commit 31a7c47 ("ipc/sem.c: cacheline align the ipc spinlock for
    semaphores").  Therefore, extend this to all ipc.
    
    The effect of cacheline alignment on sems can be seen in sembench, which
    deals mostly with semtimedop wait/wakes is seen to improve raw
    throughput (worker loops) between 8 to 12% on a 24-core x86 with over 4
    threads.
    
    Link: http://lkml.kernel.org/r/1486673582-6979-4-git-send-email-dave@stgolabs.net
    Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
    Cc: Manfred Spraul <manfred@colorfullife.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Davidlohr Bueso authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    60f3e00 View commit details
    Browse the repository at this point in the history
  52. mm: introduce kv[mz]alloc helpers

    Patch series "kvmalloc", v5.
    
    There are many open coded kmalloc with vmalloc fallback instances in the
    tree.  Most of them are not careful enough or simply do not care about
    the underlying semantic of the kmalloc/page allocator which means that
    a) some vmalloc fallbacks are basically unreachable because the kmalloc
    part will keep retrying until it succeeds b) the page allocator can
    invoke a really disruptive steps like the OOM killer to move forward
    which doesn't sound appropriate when we consider that the vmalloc
    fallback is available.
    
    As it can be seen implementing kvmalloc requires quite an intimate
    knowledge if the page allocator and the memory reclaim internals which
    strongly suggests that a helper should be implemented in the memory
    subsystem proper.
    
    Most callers, I could find, have been converted to use the helper
    instead.  This is patch 6.  There are some more relying on __GFP_REPEAT
    in the networking stack which I have converted as well and Eric Dumazet
    was not opposed [2] to convert them as well.
    
    [1] http://lkml.kernel.org/r/20170130094940.13546-1-mhocko@kernel.org
    [2] http://lkml.kernel.org/r/1485273626.16328.301.camel@edumazet-glaptop3.roam.corp.google.com
    
    This patch (of 9):
    
    Using kmalloc with the vmalloc fallback for larger allocations is a
    common pattern in the kernel code.  Yet we do not have any common helper
    for that and so users have invented their own helpers.  Some of them are
    really creative when doing so.  Let's just add kv[mz]alloc and make sure
    it is implemented properly.  This implementation makes sure to not make
    a large memory pressure for > PAGE_SZE requests (__GFP_NORETRY) and also
    to not warn about allocation failures.  This also rules out the OOM
    killer as the vmalloc is a more approapriate fallback than a disruptive
    user visible action.
    
    This patch also changes some existing users and removes helpers which
    are specific for them.  In some cases this is not possible (e.g.
    ext4_kvmalloc, libcfs_kvzalloc) because those seems to be broken and
    require GFP_NO{FS,IO} context which is not vmalloc compatible in general
    (note that the page table allocation is GFP_KERNEL).  Those need to be
    fixed separately.
    
    While we are at it, document that __vmalloc{_node} about unsupported gfp
    mask because there seems to be a lot of confusion out there.
    kvmalloc_node will warn about GFP_KERNEL incompatible (which are not
    superset) flags to catch new abusers.  Existing ones would have to die
    slowly.
    
    [sfr@canb.auug.org.au: f2fs fixup]
      Link: http://lkml.kernel.org/r/20170320163735.332e64b7@canb.auug.org.au
    Link: http://lkml.kernel.org/r/20170306103032.2540-2-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Reviewed-by: Andreas Dilger <adilger@dilger.ca>	[ext4 part]
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: John Hubbard <jhubbard@nvidia.com>
    Cc: David Miller <davem@davemloft.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    a7c3e90 View commit details
    Browse the repository at this point in the history
  53. mm, vmalloc: properly track vmalloc users

    __vmalloc_node_flags used to be static inline but this has changed by
    "mm: introduce kv[mz]alloc helpers" because kvmalloc_node needs to use
    it as well and the code is outside of the vmalloc proper.  I haven't
    realized that changing this will lead to a subtle bug though.  The
    function is responsible to track the caller as well.  This caller is
    then printed by /proc/vmallocinfo.  If __vmalloc_node_flags is not
    inline then we would get only direct users of __vmalloc_node_flags as
    callers (e.g.  v[mz]alloc) which reduces usefulness of this debugging
    feature considerably.  It simply doesn't help to see that the given
    range belongs to vmalloc as a caller:
    
      0xffffc90002c79000-0xffffc90002c7d000   16384 vmalloc+0x16/0x18 pages=3 vmalloc N0=3
      0xffffc90002c81000-0xffffc90002c85000   16384 vmalloc+0x16/0x18 pages=3 vmalloc N1=3
      0xffffc90002c8d000-0xffffc90002c91000   16384 vmalloc+0x16/0x18 pages=3 vmalloc N1=3
      0xffffc90002c95000-0xffffc90002c99000   16384 vmalloc+0x16/0x18 pages=3 vmalloc N1=3
    
    We really want to catch the _caller_ of the vmalloc function.  Fix this
    issue by making __vmalloc_node_flags static inline again.
    
    Link: http://lkml.kernel.org/r/20170502134657.12381-1-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    1f5307b View commit details
    Browse the repository at this point in the history
  54. mm: support __GFP_REPEAT in kvmalloc_node for >32kB

    vhost code uses __GFP_REPEAT when allocating vhost_virtqueue resp.
    vhost_vsock because it would really like to prefer kmalloc to the
    vmalloc fallback - see 23cc5a9 ("vhost-net: extend device
    allocation to vmalloc") for more context.  Michael Tsirkin has also
    noted:
    
     "__GFP_REPEAT overhead is during allocation time. Using vmalloc means
      all accesses are slowed down. Allocation is not on data path, accesses
      are."
    
    The similar applies to other vhost_kvzalloc users.
    
    Let's teach kvmalloc_node to handle __GFP_REPEAT properly.  There are
    two things to be careful about.  First we should prevent from the OOM
    killer and so have to involve __GFP_NORETRY by default and secondly
    override __GFP_REPEAT for !costly order requests as the __GFP_REPEAT is
    ignored for !costly orders.
    
    Supporting __GFP_REPEAT like semantic for !costly request is possible it
    would require changes in the page allocator.  This is out of scope of
    this patch.
    
    This patch shouldn't introduce any functional change.
    
    Link: http://lkml.kernel.org/r/20170306103032.2540-3-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Michael S. Tsirkin <mst@redhat.com>
    Cc: David Miller <davem@davemloft.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    6c5ab65 View commit details
    Browse the repository at this point in the history
  55. lib/rhashtable.c: simplify a strange allocation pattern

    alloc_bucket_locks allocation pattern is quite unusual.  We are
    preferring vmalloc when CONFIG_NUMA is enabled.  The rationale is that
    vmalloc will respect the memory policy of the current process and so the
    backing memory will get distributed over multiple nodes if the requester
    is configured properly.  At least that is the intention, in reality
    rhastable is shrunk and expanded from a kernel worker so no mempolicy
    can be assumed.
    
    Let's just simplify the code and use kvmalloc helper, which is a
    transparent way to use kmalloc with vmalloc fallback, if the caller is
    allowed to block and use the flag otherwise.
    
    Link: http://lkml.kernel.org/r/20170306103032.2540-4-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Tom Herbert <tom@herbertland.com>
    Cc: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    43ca5bc View commit details
    Browse the repository at this point in the history
  56. net/ipv6/ila/ila_xlat.c: simplify a strange allocation pattern

    alloc_ila_locks seemed to c&p from alloc_bucket_locks allocation pattern
    which is quite unusual.  The default allocation size is 320 *
    sizeof(spinlock_t) which is sub page unless lockdep is enabled when the
    performance benefit is really questionable and not worth the subtle code
    IMHO.  Also note that the context when we call ila_init_net (modprobe or
    a task creating a net namespace) has to be properly configured.
    
    Let's just simplify the code and use kvmalloc helper which is a
    transparent way to use kmalloc with vmalloc fallback.
    
    Link: http://lkml.kernel.org/r/20170306103032.2540-5-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Tom Herbert <tom@herbertland.com>
    Cc: Eric Dumazet <eric.dumazet@gmail.com>
    Cc: David Miller <davem@davemloft.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    847f716 View commit details
    Browse the repository at this point in the history
  57. fs/xattr.c: zero out memory copied to userspace in getxattr

    getxattr uses vmalloc to allocate memory if kzalloc fails.  This is
    filled by vfs_getxattr and then copied to the userspace.  vmalloc,
    however, doesn't zero out the memory so if the specific implementation
    of the xattr handler is sloppy we can theoretically expose a kernel
    memory.  There is no real sign this is really the case but let's make
    sure this will not happen and use vzalloc instead.
    
    Fixes: 779302e ("fs/xattr.c:getxattr(): improve handling of allocation failures")
    Link: http://lkml.kernel.org/r/20170306103327.2766-1-mhocko@kernel.org
    Acked-by: Kees Cook <keescook@chromium.org>
    Reported-by: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Cc: <stable@vger.kernel.org>	[3.6+]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    81be3de View commit details
    Browse the repository at this point in the history
  58. treewide: use kv[mz]alloc* rather than opencoded variants

    There are many code paths opencoding kvmalloc.  Let's use the helper
    instead.  The main difference to kvmalloc is that those users are
    usually not considering all the aspects of the memory allocator.  E.g.
    allocation requests <= 32kB (with 4kB pages) are basically never failing
    and invoke OOM killer to satisfy the allocation.  This sounds too
    disruptive for something that has a reasonable fallback - the vmalloc.
    On the other hand those requests might fallback to vmalloc even when the
    memory allocator would succeed after several more reclaim/compaction
    attempts previously.  There is no guarantee something like that happens
    though.
    
    This patch converts many of those places to kv[mz]alloc* helpers because
    they are more conservative.
    
    Link: http://lkml.kernel.org/r/20170306103327.2766-2-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> # Xen bits
    Acked-by: Kees Cook <keescook@chromium.org>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Andreas Dilger <andreas.dilger@intel.com> # Lustre
    Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> # KVM/s390
    Acked-by: Dan Williams <dan.j.williams@intel.com> # nvdim
    Acked-by: David Sterba <dsterba@suse.com> # btrfs
    Acked-by: Ilya Dryomov <idryomov@gmail.com> # Ceph
    Acked-by: Tariq Toukan <tariqt@mellanox.com> # mlx4
    Acked-by: Leon Romanovsky <leonro@mellanox.com> # mlx5
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Anton Vorontsov <anton@enomsg.org>
    Cc: Colin Cross <ccross@android.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
    Cc: Ben Skeggs <bskeggs@redhat.com>
    Cc: Kent Overstreet <kent.overstreet@gmail.com>
    Cc: Santosh Raspatur <santosh@chelsio.com>
    Cc: Hariprasad S <hariprasad@chelsio.com>
    Cc: Yishai Hadas <yishaih@mellanox.com>
    Cc: Oleg Drokin <oleg.drokin@intel.com>
    Cc: "Yan, Zheng" <zyan@redhat.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Alexei Starovoitov <ast@kernel.org>
    Cc: Eric Dumazet <eric.dumazet@gmail.com>
    Cc: David Miller <davem@davemloft.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    752ade6 View commit details
    Browse the repository at this point in the history
  59. net: use kvmalloc with __GFP_REPEAT rather than open coded variant

    fq_alloc_node, alloc_netdev_mqs and netif_alloc* open code kmalloc with
    vmalloc fallback.  Use the kvmalloc variant instead.  Keep the
    __GFP_REPEAT flag based on explanation from Eric:
    
     "At the time, tests on the hardware I had in my labs showed that
      vmalloc() could deliver pages spread all over the memory and that was
      a small penalty (once memory is fragmented enough, not at boot time)"
    
    The way how the code is constructed means, however, that we prefer to go
    and hit the OOM killer before we fall back to the vmalloc for requests
    <=32kB (with 4kB pages) in the current code.  This is rather disruptive
    for something that can be achived with the fallback.  On the other hand
    __GFP_REPEAT doesn't have any useful semantic for these requests.  So
    the effect of this patch is that requests which fit into 32kB will fall
    back to vmalloc easier now.
    
    Link: http://lkml.kernel.org/r/20170306103327.2766-3-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: David Miller <davem@davemloft.net>
    Cc: Shakeel Butt <shakeelb@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    da6bc57 View commit details
    Browse the repository at this point in the history
  60. drivers/md/dm-ioctl.c: use kvmalloc rather than opencoded variant

    copy_params uses kmalloc with vmalloc fallback.  We already have a
    helper for that - kvmalloc.  This caller requires GFP_NOIO semantic so
    it hasn't been converted with many others by previous patches.  All we
    need to achieve this semantic is to use the scope
    memalloc_noio_{save,restore} around kvmalloc.
    
    Link: http://lkml.kernel.org/r/20170306103327.2766-4-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Mikulas Patocka <mpatocka@redhat.com>
    Cc: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d224e93 View commit details
    Browse the repository at this point in the history
  61. drivers/md/bcache/super.c: use kvmalloc

    bcache_device_init uses kmalloc for small requests and vmalloc for those
    which are larger than 64 pages.  This alone is a strange criterion.
    Moreover kmalloc can fallback to vmalloc on the failure.  Let's simply
    use kvmalloc instead as it knows how to handle the fallback properly
    
    Link: http://lkml.kernel.org/r/20170306103327.2766-5-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Kent Overstreet <kent.overstreet@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    bc4e54f View commit details
    Browse the repository at this point in the history
  62. mm, swap: use kvzalloc to allocate some swap data structures

    Now vzalloc() is used in swap code to allocate various data structures,
    such as swap cache, swap slots cache, cluster info, etc.  Because the
    size may be too large on some system, so that normal kzalloc() may fail.
    But using kzalloc() has some advantages, for example, less memory
    fragmentation, less TLB pressure, etc.  So change the data structure
    allocation in swap code to use kvzalloc() which will try kzalloc()
    firstly, and fallback to vzalloc() if kzalloc() failed.
    
    In general, although kmalloc() will reduce the number of high-order
    pages in short term, vmalloc() will cause more pain for memory
    fragmentation in the long term.  And the swap data structure allocation
    that is changed in this patch is expected to be long term allocation.
    
    From Dave Hansen:
     "for example, we have a two-page data structure. vmalloc() takes two
      effectively random order-0 pages, probably from two different 2M pages
      and pins them. That "kills" two 2M pages. kmalloc(), allocating two
      *contiguous* pages, will not cross a 2M boundary. That means it will
      only "kill" the possibility of a single 2M page. More 2M pages == less
      fragmentation.
    
    The allocation in this patch occurs during swap on time, which is
    usually done during system boot, so usually we have high opportunity to
    allocate the contiguous pages successfully.
    
    The allocation for swap_map[] in struct swap_info_struct is not changed,
    because that is usually quite large and vmalloc_to_page() is used for
    it.  That makes it a little harder to change.
    
    Link: http://lkml.kernel.org/r/20170407064911.25447-1-ying.huang@intel.com
    Signed-off-by: Huang Ying <ying.huang@intel.com>
    Acked-by: Tim Chen <tim.c.chen@intel.com>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Rik van Riel <riel@redhat.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Shaohua Li <shli@kernel.org>
    Cc: Minchan Kim <minchan@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    yhuang-intel authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    54f180d View commit details
    Browse the repository at this point in the history
  63. mm, vmalloc: use __GFP_HIGHMEM implicitly

    __vmalloc* allows users to provide gfp flags for the underlying
    allocation.  This API is quite popular
    
      $ git grep "=[[:space:]]__vmalloc\|return[[:space:]]*__vmalloc" | wc -l
      77
    
    The only problem is that many people are not aware that they really want
    to give __GFP_HIGHMEM along with other flags because there is really no
    reason to consume precious lowmemory on CONFIG_HIGHMEM systems for pages
    which are mapped to the kernel vmalloc space.  About half of users don't
    use this flag, though.  This signals that we make the API unnecessarily
    too complex.
    
    This patch simply uses __GFP_HIGHMEM implicitly when allocating pages to
    be mapped to the vmalloc space.  Current users which add __GFP_HIGHMEM
    are simplified and drop the flag.
    
    Link: http://lkml.kernel.org/r/20170307141020.29107-1-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko@suse.com>
    Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Cristopher Lameter <cl@linux.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Michal Hocko authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    19809c2 View commit details
    Browse the repository at this point in the history
  64. scripts/spelling.txt: add "memory" pattern and fix typos

    Fix typos and add the following to the scripts/spelling.txt:
    
          momery||memory
    
    Link: http://lkml.kernel.org/r/20170317011131.6881-1-sboyd@codeaurora.org
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    bebarino authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d1b7c93 View commit details
    Browse the repository at this point in the history
  65. scripts/spelling.txt: add regsiter -> register spelling mistake

    This typo is quite common.  Fix it and add it to the spelling file so
    that checkpatch catches it earlier.
    
    Link: http://lkml.kernel.org/r/20170317011131.6881-2-sboyd@codeaurora.org
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    bebarino authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    ad61dd3 View commit details
    Browse the repository at this point in the history
  66. scripts/spelling.txt: add "intialise(d)" pattern and fix typo instances

    Fix typos and add the following to the scripts/spelling.txt:
    
      intialisation||initialisation
      intialised||initialised
      intialise||initialise
    
    This commit does not intend to change the British spelling itself.
    
    Link: http://lkml.kernel.org/r/1481573103-11329-18-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    masahir0y authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    6e7c2b4 View commit details
    Browse the repository at this point in the history
  67. treewide: spelling: correct diffrent[iate] and banlance typos

    Add these misspellings to scripts/spelling.txt too
    
    Link: http://lkml.kernel.org/r/962aace119675e5fe87be2a88ddac1a5486f8e60.1490931810.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8ac1ed7 View commit details
    Browse the repository at this point in the history
  68. treewide: move set_memory_* functions away from cacheflush.h

    Patch series "set_memory_* functions header refactor", v3.
    
    The set_memory_* APIs came out of a desire to have a better way to
    change memory attributes.  Many of these attributes were linked to cache
    functionality so the prototypes were put in cacheflush.h.  These days,
    the APIs have grown and have a much wider use than just cache APIs.  To
    support this growth, split off set_memory_* and friends into a separate
    header file to avoid growing cacheflush.h for APIs that have nothing to
    do with caches.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-2-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
    Acked-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    299878b View commit details
    Browse the repository at this point in the history
  69. arm: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly
    
    Link: http://lkml.kernel.org/r/1488920133-27229-3-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    74d86a7 View commit details
    Browse the repository at this point in the history
  70. arm64: use set_memory.h header

    The set_memory_* functions have moved to set_memory.h.  Use that header
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-4-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Acked-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d4bbc30 View commit details
    Browse the repository at this point in the history
  71. s390: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly
    
    Link: http://lkml.kernel.org/r/1488920133-27229-5-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e6c7c63 View commit details
    Browse the repository at this point in the history
  72. x86: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-6-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d116365 View commit details
    Browse the repository at this point in the history
  73. agp: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-7-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e47036b View commit details
    Browse the repository at this point in the history
  74. drm: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    [akpm@linux-foundation.org: track drivers/gpu/drm/i915/i915_gem_gtt.c linux-next changes]
    Link: http://lkml.kernel.org/r/1488920133-27229-8-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    ed3ba07 View commit details
    Browse the repository at this point in the history
  75. drivers/hwtracing/intel_th/msu.c: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-9-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    0c14dac View commit details
    Browse the repository at this point in the history
  76. drivers/watchdog/hpwdt.c: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-10-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    23f19a5 View commit details
    Browse the repository at this point in the history
  77. include/linux/filter.h: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-11-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    2d0bde5 View commit details
    Browse the repository at this point in the history
  78. kernel/module.c: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-12-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Jessica Yu <jeyu@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    bbca07c View commit details
    Browse the repository at this point in the history
  79. kernel/power/snapshot.c: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-13-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    50327dd View commit details
    Browse the repository at this point in the history
  80. alsa: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-14-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    7f80f51 View commit details
    Browse the repository at this point in the history
  81. drivers/misc/sram-exec.c: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-15-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    056d16b View commit details
    Browse the repository at this point in the history
  82. drivers/video/fbdev/vermilion/vermilion.c: use set_memory.h header

    set_memory_* functions have moved to set_memory.h.  Switch to this
    explicitly.
    
    Link: http://lkml.kernel.org/r/1488920133-27229-16-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8d5a118 View commit details
    Browse the repository at this point in the history
  83. drivers/staging/media/atomisp/pci/atomisp2: use set_memory.h

    Cc: Laura Abbott <labbott@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    akpm00 authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    880d5a3 View commit details
    Browse the repository at this point in the history
  84. treewide: decouple cacheflush.h and set_memory.h

    Now that all call sites, completely decouple cacheflush.h and
    set_memory.h
    
    [sfr@canb.auug.org.au: kprobes/x86: merge fix for set_memory.h decoupling]
      Link: http://lkml.kernel.org/r/20170418180903.10300fd3@canb.auug.org.au
    Link: http://lkml.kernel.org/r/1488920133-27229-17-git-send-email-labbott@redhat.com
    Signed-off-by: Laura Abbott <labbott@redhat.com>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Acked-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    labbott authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e6ccbff View commit details
    Browse the repository at this point in the history
  85. kref: remove WARN_ON for NULL release functions

    The kref functions check for NULL release functions.  This WARN_ON seems
    rather pointless.  We will eventually release and then just crash
    nicely.  It is also somewhat expensive because these functions are
    inlined in a lot of places.  Removing the WARN_ONs saves around 2.3k in
    this kernel (likely more in others with more drivers)
    
         text    data     bss     dec     hex filename
      9083992 5367600 11116544        25568136        1862388 vmlinux-before-load-avg
      9070166 5367600 11116544        25554310        185ed86 vmlinux-load-avg
    
    Link: http://lkml.kernel.org/r/20170315021431.13107-5-andi@firstfloor.org
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Andi Kleen authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    ec48c94 View commit details
    Browse the repository at this point in the history
  86. drivers/scsi/megaraid: remove expensive inline from megasas_return_cmd

    Remove an inline from a fairly big function that is used often.  It's
    unlikely that calling or not calling it makes a lot of difference.
    
    Saves around 8k text in my kernel.
    
         text    data     bss     dec     hex filename
      9047801 5367568 11116544        25531913        1859609 vmlinux-before-megasas
      9039417 5367568 11116544        25523529        1857549 vmlinux-megasas
    
    Link: http://lkml.kernel.org/r/20170315021431.13107-7-andi@firstfloor.org
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Cc: Kashyap Desai <kashyap.desai@avagotech.com>
    Cc: Sumit Saxena <sumit.saxena@avagotech.com>
    Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Andi Kleen authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    68b4374 View commit details
    Browse the repository at this point in the history
  87. include/linux/uaccess.h: remove expensive WARN_ON in pagefault_disabl…

    …ed_dec
    
    pagefault_disabled_dec is frequently used inline, and it has a WARN_ON
    for underflow that expands to about 6.5k of extra code.  The warning
    doesn't seem to be that useful and worth so much code so remove it.
    
    If it was needed could make it depending on some debug kernel option.
    
    Saves ~6.5k in my kernel
    
         text    data     bss     dec     hex filename
      9039417 5367568 11116544        25523529        1857549 vmlinux-before-pf
      9032805 5367568 11116544        25516917        1855b75 vmlinux-pf
    
    Link: http://lkml.kernel.org/r/20170315021431.13107-8-andi@firstfloor.org
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Andi Kleen authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f44a292 View commit details
    Browse the repository at this point in the history
  88. fs: semove set but not checked AOP_FLAG_UNINTERRUPTIBLE flag

    Commit afddba4 ("fs: introduce write_begin, write_end, and
    perform_write aops") introduced AOP_FLAG_UNINTERRUPTIBLE flag which was
    checked in pagecache_write_begin(), but that check was removed by
    4e02ed4 ("fs: remove prepare_write/commit_write").
    
    Between these two commits, commit d941477 ("cifs: Convert cifs to
    new aops.") added a check in cifs_write_begin(), but that check was soon
    removed by commit a98ee8c ("[CIFS] fix regression in
    cifs_write_begin/cifs_write_end").
    
    Therefore, AOP_FLAG_UNINTERRUPTIBLE flag is checked nowhere.  Let's
    remove this flag.  This patch has no functionality changes.
    
    Link: http://lkml.kernel.org/r/1489294781-53494-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp
    Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Reviewed-by: Jeff Layton <jlayton@redhat.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Cc: Nick Piggin <npiggin@gmail.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Tetsuo Handa authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c718a97 View commit details
    Browse the repository at this point in the history
  89. Documentation/vm/transhuge.txt: fix trivial typos

    [akpm@linux-foundation.org: fixes per Randy]
    Link: http://lkml.kernel.org/r/20170405210259.2067-1-sj38.park@gmail.com
    Signed-off-by: SeongJae Park <sj38.park@gmail.com>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    sjp38 authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    929f9d2 View commit details
    Browse the repository at this point in the history
  90. format-security: move static strings to const

    While examining output from trial builds with -Wformat-security enabled,
    many strings were found that should be defined as "const", or as a char
    array instead of char pointer.  This makes some static analysis easier,
    by producing fewer false positives.
    
    As these are all trivial changes, it seemed best to put them all in a
    single patch rather than chopping them up per maintainer.
    
    Link: http://lkml.kernel.org/r/20170405214711.GA5711@beast
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Acked-by: Jes Sorensen <jes@trained-monkey.org>	[runner.c]
    Cc: Tony Lindgren <tony@atomide.com>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
    Cc: Viresh Kumar <viresh.kumar@linaro.org>
    Cc: Daniel Vetter <daniel.vetter@intel.com>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: Sean Paul <seanpaul@chromium.org>
    Cc: David Airlie <airlied@linux.ie>
    Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
    Cc: Salil Mehta <salil.mehta@huawei.com>
    Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Cc: Jiri Slaby <jslaby@suse.com>
    Cc: Patrice Chotard <patrice.chotard@st.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: James Hogan <james.hogan@imgtec.com>
    Cc: Paul Burton <paul.burton@imgtec.com>
    Cc: Matt Redfearn <matt.redfearn@imgtec.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: Mugunthan V N <mugunthanvnm@ti.com>
    Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
    Cc: Jarod Wilson <jarod@redhat.com>
    Cc: Florian Westphal <fw@strlen.de>
    Cc: Antonio Quartulli <a@unstable.cc>
    Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Cc: Kejian Yan <yankejian@huawei.com>
    Cc: Daode Huang <huangdaode@hisilicon.com>
    Cc: Qianqian Xie <xieqianqian@huawei.com>
    Cc: Philippe Reynes <tremyfr@gmail.com>
    Cc: Colin Ian King <colin.king@canonical.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Christian Gromm <christian.gromm@microchip.com>
    Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de>
    Cc: Jason Litzinger <jlitzingerdev@gmail.com>
    Cc: WANG Cong <xiyou.wangcong@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kees authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    0632466 View commit details
    Browse the repository at this point in the history
  91. fs: f2fs: use ktime_get_real_seconds for sit_info times

    CURRENT_TIME_SEC is not y2038 safe.
    
    Replace use of CURRENT_TIME_SEC with ktime_get_real_seconds in segment
    timestamps used by GC algorithm including the segment mtime timestamps.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-2-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Reviewed-by: Arnd Bergmann <arnd@arndb.de>
    Cc: Jaegeuk Kim <jaegeuk@kernel.org>
    Cc: Chao Yu <yuchao0@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    48fbfe5 View commit details
    Browse the repository at this point in the history
  92. trace: make trace_hwlat timestamp y2038 safe

    struct timespec is not y2038 safe on 32 bit machines and needs to be
    replaced by struct timespec64 in order to represent times beyond year
    2038 on such machines.
    
    Fix all the timestamp representation in struct trace_hwlat and all the
    corresponding implementations.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-3-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    51aad0a View commit details
    Browse the repository at this point in the history
  93. fs: cifs: replace CURRENT_TIME by other appropriate apis

    CURRENT_TIME macro is not y2038 safe on 32 bit systems.
    
    The patch replaces all the uses of CURRENT_TIME by current_time() for
    filesystem times, and ktime_get_* functions for authentication
    timestamps and timezone calculations.
    
    This is also in preparation for the patch that transitions vfs
    timestamps to use 64 bit time and hence make them y2038 safe.
    
    CURRENT_TIME macro will be deleted before merging the aforementioned
    change.
    
    The inode timestamps read from the server are assumed to have correct
    granularity and range.
    
    The patch also assumes that the difference between server and client
    times lie in the range INT_MIN..INT_MAX.  This is valid because this is
    the difference between current times between server and client, and the
    largest timezone difference is in the range of one day.
    
    All cifs timestamps currently use timespec representation internally.
    Authentication and timezone timestamps can also be transitioned into
    using timespec64 when all other timestamps for cifs is transitioned to
    use timespec64.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-4-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Reviewed-by: Arnd Bergmann <arnd@arndb.de>
    Cc: Steve French <sfrench@samba.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e37fea5 View commit details
    Browse the repository at this point in the history
  94. fs: ceph: CURRENT_TIME with ktime_get_real_ts()

    CURRENT_TIME is not y2038 safe.  The macro will be deleted and all the
    references to it will be replaced by ktime_get_* apis.
    
    struct timespec is also not y2038 safe.  Retain timespec for timestamp
    representation here as ceph uses it internally everywhere.  These
    references will be changed to use struct timespec64 in a separate patch.
    
    The current_fs_time() api is being changed to use vfs struct inode* as
    an argument instead of struct super_block*.
    
    Set the new mds client request r_stamp field using ktime_get_real_ts()
    instead of using current_fs_time().
    
    Also, since r_stamp is used as mtime on the server, use timespec_trunc()
    to truncate the timestamp, using the right granularity from the
    superblock.
    
    This api will be transitioned to be y2038 safe along with vfs.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-5-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Reviewed-by: Arnd Bergmann <arnd@arndb.de>
    M:	Ilya Dryomov <idryomov@gmail.com>
    M:	"Yan, Zheng" <zyan@redhat.com>
    M:	Sage Weil <sage@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    1134e09 View commit details
    Browse the repository at this point in the history
  95. fs: ufs: use ktime_get_real_ts64() for birthtime

    CURRENT_TIME is not y2038 safe.  Replace it with ktime_get_real_ts64().
    Inode time formats are already 64 bit long and accommodates time64_t.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-6-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Cc: Evgeniy Dushistov <dushistov@mail.ru>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    a88e99e View commit details
    Browse the repository at this point in the history
  96. fs: ubifs: replace CURRENT_TIME_SEC with current_time

    CURRENT_TIME_SEC is not y2038 safe.  current_time() will be transitioned
    to use 64 bit time along with vfs in a separate patch.  There is no plan
    to transition CURRENT_TIME_SEC to use y2038 safe time interfaces.
    
    current_time() returns timestamps according to the granularities set in
    the inode's super_block.  The granularity check to call
    current_fs_time() or CURRENT_TIME_SEC is not required.
    
    Use current_time() directly to update inode timestamp.  Use
    timespec_trunc during file system creation, before the first inode is
    created.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-9-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Reviewed-by: Arnd Bergmann <arnd@arndb.de>
    Cc: Richard Weinberger <richard@nod.at>
    Cc: Artem Bityutskiy <dedekind1@gmail.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    607a11a View commit details
    Browse the repository at this point in the history
  97. lustre: replace CURRENT_TIME macro

    CURRENT_TIME macro is not y2038 safe on 32 bit systems.
    
    The patch replaces all the uses of CURRENT_TIME by current_time() for
    filesystem times, and ktime_get_* functions for others.
    
    struct timespec is also not y2038 safe.  Retain timespec for timestamp
    representation here as lustre uses it internally everywhere.  These
    references will be changed to use struct timespec64 in a separate patch.
    
    This is also in preparation for the patch that transitions vfs
    timestamps to use 64 bit time and hence make them y2038 safe.
    current_time() is also planned to be transitioned to y2038 safe behavior
    along with this change.
    
    CURRENT_TIME macro will be deleted before merging the aforementioned
    change.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-10-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Cc: Oleg Drokin <oleg.drokin@intel.com>
    Cc: Andreas Dilger <andreas.dilger@intel.com>
    Cc: James Simmons <jsimmons@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    47f38c5 View commit details
    Browse the repository at this point in the history
  98. apparmorfs: replace CURRENT_TIME with current_time()

    CURRENT_TIME macro is not y2038 safe on 32 bit systems.
    
    The patch replaces all the uses of CURRENT_TIME by current_time().
    
    This is also in preparation for the patch that transitions vfs
    timestamps to use 64 bit time and hence make them y2038 safe.
    current_time() is also planned to be transitioned to y2038 safe behavior
    along with this change.
    
    CURRENT_TIME macro will be deleted before merging the aforementioned
    change.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-11-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Acked-by: John Johansen <john.johansen@canonical.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    24d0d03 View commit details
    Browse the repository at this point in the history
  99. gfs2: replace CURRENT_TIME with current_time

    Link: http://lkml.kernel.org/r/20170420161852.0492bc3f@canb.auug.org.au
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    sfrothwell authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    b32c8c7 View commit details
    Browse the repository at this point in the history
  100. time: delete CURRENT_TIME_SEC and CURRENT_TIME

    All uses of CURRENT_TIME_SEC and CURRENT_TIME macros have been replaced
    by other time functions.  These macros are also not y2038 safe.  And,
    all their use cases can be fulfilled by y2038 safe ktime_get_* variants.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-12-git-send-email-deepa.kernel@gmail.com
    Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
    Reviewed-by: Arnd Bergmann <arnd@arndb.de>
    Acked-by: John Stultz <john.stultz@linaro.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    deepa-hub authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    bfe1c56 View commit details
    Browse the repository at this point in the history
  101. mm/huge_memory.c: use zap_deposited_table() more

    Depending on the flags of the PMD being zapped there may or may not be a
    deposited pgtable to be freed.  In two of the three cases this is open
    coded while the third uses the zap_deposited_table() helper.  This patch
    converts the others to use the helper to clean things up a bit.
    
    Link: http://lkml.kernel.org/r/20170411174233.21902-2-oohall@gmail.com
    Cc: Reza Arbab <arbab@linux.vnet.ibm.com>
    Cc: Balbir Singh <bsingharora@gmail.com>
    Cc: linux-nvdimm@ml01.01.org
    Cc: Oliver O'Halloran <oohall@gmail.com>
    Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    oohal authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c14a6eb View commit details
    Browse the repository at this point in the history
  102. mm/huge_memory.c: deposit a pgtable for DAX PMD faults when required

    Although all architectures use a deposited page table for THP on
    anonymous VMAs, some architectures (s390 and powerpc) require the
    deposited storage even for file backed VMAs due to quirks of their MMUs.
    
    This patch adds support for depositing a table in DAX PMD fault handling
    path for archs that require it.  Other architectures should see no
    functional changes.
    
    Link: http://lkml.kernel.org/r/20170411174233.21902-3-oohall@gmail.com
    Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
    Cc: Reza Arbab <arbab@linux.vnet.ibm.com>
    Cc: Balbir Singh <bsingharora@gmail.com>
    Cc: linux-nvdimm@ml01.01.org
    Cc: Oliver O'Halloran <oohall@gmail.com>
    Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    oohal authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    3b6521f View commit details
    Browse the repository at this point in the history
  103. mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC

    Patch series "more robust PF_MEMALLOC handling"
    
    This series aims to unify the setting and clearing of PF_MEMALLOC, which
    prevents recursive reclaim.  There are some places that clear the flag
    unconditionally from current->flags, which may result in clearing a
    pre-existing flag.  This already resulted in a bug report that Patch 1
    fixes (without the new helpers, to make backporting easier).  Patch 2
    introduces the new helpers, modelled after existing memalloc_noio_* and
    memalloc_nofs_* helpers, and converts mm core to use them.  Patches 3
    and 4 convert non-mm code.
    
    This patch (of 4):
    
    __alloc_pages_direct_compact() sets PF_MEMALLOC to prevent deadlock
    during page migration by lock_page() (see the comment in
    __unmap_and_move()).  Then it unconditionally clears the flag, which can
    clear a pre-existing PF_MEMALLOC flag and result in recursive reclaim.
    This was not a problem until commit a8161d1 ("mm, page_alloc:
    restructure direct compaction handling in slowpath"), because direct
    compation was called only after direct reclaim, which was skipped when
    PF_MEMALLOC flag was set.
    
    Even now it's only a theoretical issue, as the new callsite of
    __alloc_pages_direct_compact() is reached only for costly orders and
    when gfp_pfmemalloc_allowed() is true, which means either
    __GFP_NOMEMALLOC is in gfp_flags or in_interrupt() is true.  There is no
    such known context, but let's play it safe and make
    __alloc_pages_direct_compact() robust for cases where PF_MEMALLOC is
    already set.
    
    Fixes: a8161d1 ("mm, page_alloc: restructure direct compaction handling in slowpath")
    Link: http://lkml.kernel.org/r/20170405074700.29871-2-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Reported-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
    Cc: Chris Leech <cleech@redhat.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Josef Bacik <jbacik@fb.com>
    Cc: Lee Duncan <lduncan@suse.com>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Richard Weinberger <richard@nod.at>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    62be151 View commit details
    Browse the repository at this point in the history
  104. mm: introduce memalloc_noreclaim_{save,restore}

    The previous patch ("mm: prevent potential recursive reclaim due to
    clearing PF_MEMALLOC") has shown that simply setting and clearing
    PF_MEMALLOC in current->flags can result in wrongly clearing a
    pre-existing PF_MEMALLOC flag and potentially lead to recursive reclaim.
    Let's introduce helpers that support proper nesting by saving the
    previous stat of the flag, similar to the existing memalloc_noio_* and
    memalloc_nofs_* helpers.  Convert existing setting/clearing of
    PF_MEMALLOC within mm to the new helpers.
    
    There are no known issues with the converted code, but the change makes
    it more robust.
    
    Link: http://lkml.kernel.org/r/20170405074700.29871-3-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Suggested-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
    Cc: Chris Leech <cleech@redhat.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Josef Bacik <jbacik@fb.com>
    Cc: Lee Duncan <lduncan@suse.com>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Richard Weinberger <richard@nod.at>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    499118e View commit details
    Browse the repository at this point in the history
  105. treewide: convert PF_MEMALLOC manipulations to new helpers

    We now have memalloc_noreclaim_{save,restore} helpers for robust setting
    and clearing of PF_MEMALLOC.  Let's convert the code which was using the
    generic tsk_restore_flags().  No functional change.
    
    [vbabka@suse.cz: in net/core/sock.c the hunk is missing]
    Link: http://lkml.kernel.org/r/20170405074700.29871-4-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Cc: Josef Bacik <jbacik@fb.com>
    Cc: Lee Duncan <lduncan@suse.com>
    Cc: Chris Leech <cleech@redhat.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Richard Weinberger <richard@nod.at>
    Cc: Wouter Verhelst <w@uter.be>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f108304 View commit details
    Browse the repository at this point in the history
  106. mtd: nand: nandsim: convert to memalloc_noreclaim_*()

    Nandsim has own functions set_memalloc() and clear_memalloc() for robust
    setting and clearing of PF_MEMALLOC.  Replace them by the new generic
    helpers.  No functional change.
    
    Link: http://lkml.kernel.org/r/20170405074700.29871-5-vbabka@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
    Cc: Richard Weinberger <richard@nod.at>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Cc: Chris Leech <cleech@redhat.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Josef Bacik <jbacik@fb.com>
    Cc: Lee Duncan <lduncan@suse.com>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    dcbe821 View commit details
    Browse the repository at this point in the history
  107. dax: add tracepoints to dax_iomap_pte_fault()

    Patch series "second round of tracepoints for DAX".
    
    This second round of DAX tracepoint patches adds tracing to the PTE
    fault path (dax_iomap_pte_fault(), dax_pfn_mkwrite(), dax_load_hole(),
    dax_insert_mapping()) and to the writeback path
    (dax_writeback_mapping_range(), dax_writeback_one()).
    
    The purpose of this tracing is to give us a high level view of what DAX
    is doing, whether faults are being serviced by PMDs or PTEs, and by real
    storage or by zero pages covering holes.
    
    I do have some patches nearly ready which also add tracing to
    grab_mapping_entry() and dax_insert_mapping_entry().  These are more
    targeted at logging how we are interacting with the radix tree, how we
    use empty entries for locking, whether we "downgrade" huge zero pages to
    4k PTE sized allocations, etc.  In the end it seemed to me that this
    might be too detailed to have as constantly present tracepoints, but if
    anyone sees value in having tracepoints like this in the DAX code
    permanently (Jan?), please let me know and I'll add those last two
    patches.
    
    All these tracepoints were done to be consistent with the style of the
    XFS tracepoints and with the existing DAX PMD tracepoints.
    
    This patch (of 6):
    
    Add tracepoints to dax_iomap_pte_fault(), following the same logging
    conventions as the rest of DAX.
    
    Here is an example fault that initially tries to be serviced by the PMD
    fault handler but which falls back to PTEs because the VMA isn't large
    enough to hold a PMD:
    
      small-1086  [005] ....
       71.140014: xfs_filemap_huge_fault: dev 259:0 ino 0x1003
    
      small-1086  [005] ....
        71.140027: dax_pmd_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 vm_start 0x10200000 vm_end 0x10500000 pgoff 0x220 max_pgoff 0x1400
    
      small-1086  [005] ....
        71.140028: dax_pmd_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 vm_start 0x10200000 vm_end 0x10500000 pgoff 0x220 max_pgoff 0x1400 FALLBACK
    
      small-1086  [005] ....
        71.140035: dax_pte_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 pgoff 0x220
    
      small-1086  [005] ....
        71.140396: dax_pte_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 pgoff 0x220 MAJOR|NOPAGE
    
    Link: http://lkml.kernel.org/r/20170221195116.13278-2-ross.zwisler@linux.intel.com
    Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Matthew Wilcox <mawilcox@microsoft.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Ross Zwisler authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    a9c42b3 View commit details
    Browse the repository at this point in the history
  108. dax: add tracepoints to dax_pfn_mkwrite()

    Add tracepoints to dax_pfn_mkwrite(), following the same logging
    conventions as the rest of DAX.
    
    Here is an example PTE fault followed by a pfn_mkwrite:
    
      small_aligned-1094  [002] ....
       374.084998: dax_pte_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10400000 pgoff 0x200
    
      small_aligned-1094  [002] ....
       374.085145: dax_pte_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10400000 pgoff 0x200 MAJOR|NOPAGE
    
      small_aligned-1094  [002] ....
       374.085165: dax_pfn_mkwrite: dev 259:0 ino 0x1003 shared WRITE|MKWRITE|ALLOW_RETRY|KILLABLE|USER address 0x10400000 pgoff 0x200 NOPAGE
    
    Link: http://lkml.kernel.org/r/20170221195116.13278-3-ross.zwisler@linux.intel.com
    Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Matthew Wilcox <mawilcox@microsoft.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Ross Zwisler authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c3ff68d View commit details
    Browse the repository at this point in the history
  109. dax: add tracepoints to dax_load_hole()

    Add tracepoints to dax_load_hole(), following the same logging conventions
    as the rest of DAX.
    
    Here is the logging generated by a PTE read from a hole:
    
      read-1075  [002] ....
        62.362108: dax_pte_fault: dev 259:0 ino 0x1003 shared ALLOW_RETRY|KILLABLE|USER address 0x10480000 pgoff 0x280
    
      read-1075  [002] ....
        62.362140: dax_load_hole: dev 259:0 ino 0x1003 shared ALLOW_RETRY|KILLABLE|USER address 0x10480000 pgoff 0x280 NOPAGE
    
      read-1075  [002] ....
        62.362141: dax_pte_fault_done: dev 259:0 ino 0x1003 shared ALLOW_RETRY|KILLABLE|USER address 0x10480000 pgoff 0x280 NOPAGE
    
    Link: http://lkml.kernel.org/r/20170221195116.13278-4-ross.zwisler@linux.intel.com
    Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Matthew Wilcox <mawilcox@microsoft.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Ross Zwisler authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    678c9fd View commit details
    Browse the repository at this point in the history
  110. dax: add tracepoints to dax_writeback_mapping_range()

    Add tracepoints to dax_writeback_mapping_range(), following the same
    logging conventions as the rest of DAX.
    
    Here is an example writeback call:
    
      msync-1085  [006] ....
       200.902565: dax_writeback_range: dev 259:0 ino 0x1003 pgoff 0x200-0x2ff
    
      msync-1085  [006] ....
       200.902579: dax_writeback_range_done: dev 259:0 ino 0x1003 pgoff 0x200-0x2ff
    
    [ross.zwisler@linux.intel.com: fix regression in dax_writeback_mapping_range()]
      Link: http://lkml.kernel.org/r/20170314215358.31451-1-ross.zwisler@linux.intel.com
    Link: http://lkml.kernel.org/r/20170221195116.13278-5-ross.zwisler@linux.intel.com
    Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Matthew Wilcox <mawilcox@microsoft.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Ross Zwisler authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d14a3f4 View commit details
    Browse the repository at this point in the history
  111. dax: add tracepoint to dax_writeback_one()

    Add a tracepoint to dax_writeback_one(), following the same logging
    conventions as the rest of DAX.
    
    Here is an example range writeback which ends up flushing one PMD and
    one PTE:
    
      test-1265  [003] ....
       496.615250: dax_writeback_range: dev 259:0 ino 0x1003 pgoff 0x0-0x7ffffffffffff
    
      test-1265  [003] ....
       496.616263: dax_writeback_one: dev 259:0 ino 0x1003 pgoff 0x0 pglen 0x200
    
      test-1265  [003] ....
       496.616270: dax_writeback_one: dev 259:0 ino 0x1003 pgoff 0x305 pglen 0x1
    
      test-1265  [003] ....
       496.616272: dax_writeback_range_done: dev 259:0 ino 0x1003 pgoff 0x0-0x7ffffffffffff
    
    [akpm@linux-foundation.org: struct blk_dax_ctl has disappeared]
    Link: http://lkml.kernel.org/r/20170221195116.13278-6-ross.zwisler@linux.intel.com
    Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Matthew Wilcox <mawilcox@microsoft.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Ross Zwisler authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f9bc3a0 View commit details
    Browse the repository at this point in the history
  112. dax: add tracepoint to dax_insert_mapping()

    Add a tracepoint to dax_insert_mapping(), following the same logging
    conventions as the rest of DAX.  This tracepoint, along with the one in
    dax_load_hole(), lets us know how a DAX PTE fault was serviced.
    
    Here is an example DAX fault that inserts a PTE mapping:
    
      small-1126  [007] ....
       145.451604: dax_pte_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 pgoff 0x220
    
      small-1126  [007] ....
       145.452317: dax_insert_mapping: dev 259:0 ino 0x1003 shared write address 0x10420000 radix_entry 0x100006
    
      small-1126  [007] ....
       145.452399: dax_pte_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 pgoff 0x220 MAJOR|NOPAGE
    
    Link: http://lkml.kernel.org/r/20170221195116.13278-7-ross.zwisler@linux.intel.com
    Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Matthew Wilcox <mawilcox@microsoft.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Ross Zwisler authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    b444073 View commit details
    Browse the repository at this point in the history
  113. selftests/vm: add a test for virtual address range mapping

    This verifies virtual address mapping below and above the 128TB range
    and makes sure that address returned are within the expected range
    depending upon the hint passed from the user space.
    
    Link: http://lkml.kernel.org/r/20170418095252.20533-1-khandual@linux.vnet.ibm.com
    Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
    Cc: Michal Suchanek <msuchanek@suse.de>
    Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
    Cc: Shuah Khan <shuahkh@osg.samsung.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Anshuman Khandual authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    4e5ce33 View commit details
    Browse the repository at this point in the history
  114. drivers/staging/ccree/ssi_hash.c: fix build with gcc-4.4.4

      drivers/staging/ccree/ssi_hash.c:1990: error: unknown field 'template_ahash' specified in initializer
      drivers/staging/ccree/ssi_hash.c:1991: error: unknown field 'init' specified in initializer
      drivers/staging/ccree/ssi_hash.c:1991: warning: missing braces around initializer
      drivers/staging/ccree/ssi_hash.c:1991: warning: (near initialization for 'driver_hash[0].<anonymous>.template_ahash')
      drivers/staging/ccree/ssi_hash.c:1992: error: unknown field 'update' specified in initializer
      drivers/staging/ccree/ssi_hash.c:1992: warning: excess elements in union initializer
      drivers/staging/ccree/ssi_hash.c:1992: warning: (near initialization for 'driver_hash[0].<anonymous>')
      drivers/staging/ccree/ssi_hash.c:1993: error: unknown field 'final' specified in initializer
      drivers/staging/ccree/ssi_hash.c:1993: warning: excess elements in union initializer
      drivers/staging/ccree/ssi_hash.c:1993: warning: (near initialization for 'driver_hash[0].<anonymous>')
      ...
    
    gcc-4.4.4 has issues with anon union initializers.  Work around this.
    
    Cc: Gilad Ben-Yossef <gilad@benyossef.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    akpm00 authored and torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    4d2b5bc View commit details
    Browse the repository at this point in the history
  115. Merge branch 'akpm' (patches from Andrew)

    Merge more updates from Andrew Morton:
    
     - the rest of MM
    
     - various misc things
    
     - procfs updates
    
     - lib/ updates
    
     - checkpatch updates
    
     - kdump/kexec updates
    
     - add kvmalloc helpers, use them
    
     - time helper updates for Y2038 issues. We're almost ready to remove
       current_fs_time() but that awaits a btrfs merge.
    
     - add tracepoints to DAX
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (114 commits)
      drivers/staging/ccree/ssi_hash.c: fix build with gcc-4.4.4
      selftests/vm: add a test for virtual address range mapping
      dax: add tracepoint to dax_insert_mapping()
      dax: add tracepoint to dax_writeback_one()
      dax: add tracepoints to dax_writeback_mapping_range()
      dax: add tracepoints to dax_load_hole()
      dax: add tracepoints to dax_pfn_mkwrite()
      dax: add tracepoints to dax_iomap_pte_fault()
      mtd: nand: nandsim: convert to memalloc_noreclaim_*()
      treewide: convert PF_MEMALLOC manipulations to new helpers
      mm: introduce memalloc_noreclaim_{save,restore}
      mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC
      mm/huge_memory.c: deposit a pgtable for DAX PMD faults when required
      mm/huge_memory.c: use zap_deposited_table() more
      time: delete CURRENT_TIME_SEC and CURRENT_TIME
      gfs2: replace CURRENT_TIME with current_time
      apparmorfs: replace CURRENT_TIME with current_time()
      lustre: replace CURRENT_TIME macro
      fs: ubifs: replace CURRENT_TIME_SEC with current_time
      fs: ufs: use ktime_get_real_ts64() for birthtime
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    bf5f894 View commit details
    Browse the repository at this point in the history
  116. Merge tag 'tty-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/tty
    
    Pull tty/serial updates from Greg KH:
     "Here is the "big" TTY/Serial patch updates for 4.12-rc1
    
      Not a lot of new things here, the normal number of serial driver
      updates and additions, tiny bugs fixed, and some core files split up
      to make future changes a bit easier for Nicolas's "tiny-tty" work.
    
      All of these have been in linux-next for a while"
    
    * tag 'tty-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (62 commits)
      serial: small Makefile reordering
      tty: split job control support into a file of its own
      tty: move baudrate handling code to a file of its own
      console: move console_init() out of tty_io.c
      serial: 8250_early: Add earlycon support for Palmchip UART
      tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44
      vt: make mouse selection of non-ASCII consistent
      vt: set mouse selection word-chars to gpm's default
      imx-serial: Reduce RX DMA startup latency when opening for reading
      serial: omap: suspend device on probe errors
      serial: omap: fix runtime-pm handling on unbind
      tty: serial: omap: add UPF_BOOT_AUTOCONF flag for DT init
      serial: samsung: Remove useless spinlock
      serial: samsung: Add missing checks for dma_map_single failure
      serial: samsung: Use right device for DMA-mapping calls
      serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off
      tty: fix comment typo s/repsonsible/responsible/
      tty: amba-pl011: Fix spurious TX interrupts
      serial: xuartps: Enable clocks in the pm disable case also
      serial: core: Re-use struct uart_port {name} field
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8f3207c View commit details
    Browse the repository at this point in the history
  117. Merge tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/helgaas/pci
    
    Pull PCI updates from Bjorn Helgaas:
    
     - add framework for supporting PCIe devices in Endpoint mode (Kishon
       Vijay Abraham I)
    
     - use non-postable PCI config space mappings when possible (Lorenzo
       Pieralisi)
    
     - clean up and unify mmap of PCI BARs (David Woodhouse)
    
     - export and unify Function Level Reset support (Christoph Hellwig)
    
     - avoid FLR for Intel 82579 NICs (Sasha Neftin)
    
     - add pci_request_irq() and pci_free_irq() helpers (Christoph Hellwig)
    
     - short-circuit config access failures for disconnected devices (Keith
       Busch)
    
     - remove D3 sleep delay when possible (Adrian Hunter)
    
     - freeze PME scan before suspending devices (Lukas Wunner)
    
     - stop disabling MSI/MSI-X in pci_device_shutdown() (Prarit Bhargava)
    
     - disable boot interrupt quirk for ASUS M2N-LR (Stefan Assmann)
    
     - add arch-specific alignment control to improve device passthrough by
       avoiding multiple BARs in a page (Yongji Xie)
    
     - add sysfs sriov_drivers_autoprobe to control VF driver binding
       (Bodong Wang)
    
     - allow slots below PCI-to-PCIe "reverse bridges" (Bjorn Helgaas)
    
     - fix crashes when unbinding host controllers that don't support
       removal (Brian Norris)
    
     - add driver for MicroSemi Switchtec management interface (Logan
       Gunthorpe)
    
     - add driver for Faraday Technology FTPCI100 host bridge (Linus
       Walleij)
    
     - add i.MX7D support (Andrey Smirnov)
    
     - use generic MSI support for Aardvark (Thomas Petazzoni)
    
     - make Rockchip driver modular (Brian Norris)
    
     - advertise 128-byte Read Completion Boundary support for Rockchip
       (Shawn Lin)
    
     - advertise PCI_EXP_LNKSTA_SLC for Rockchip root port (Shawn Lin)
    
     - convert atomic_t to refcount_t in HV driver (Elena Reshetova)
    
     - add CPU IRQ affinity in HV driver (K. Y. Srinivasan)
    
     - fix PCI bus removal in HV driver (Long Li)
    
     - add support for ThunderX2 DMA alias topology (Jayachandran C)
    
     - add ThunderX pass2.x 2nd node MCFG quirk (Tomasz Nowicki)
    
     - add ITE 8893 bridge DMA alias quirk (Jarod Wilson)
    
     - restrict Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices
       (Manish Jaggi)
    
    * tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (146 commits)
      PCI: Don't allow unbinding host controllers that aren't prepared
      ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP
      MAINTAINERS: Add PCI Endpoint maintainer
      Documentation: PCI: Add userguide for PCI endpoint test function
      tools: PCI: Add sample test script to invoke pcitest
      tools: PCI: Add a userspace tool to test PCI endpoint
      Documentation: misc-devices: Add Documentation for pci-endpoint-test driver
      misc: Add host side PCI driver for PCI test function device
      PCI: Add device IDs for DRA74x and DRA72x
      dt-bindings: PCI: dra7xx: Add DT bindings to enable unaligned access
      PCI: dwc: dra7xx: Workaround for errata id i870
      dt-bindings: PCI: dra7xx: Add DT bindings for PCI dra7xx EP mode
      PCI: dwc: dra7xx: Add EP mode support
      PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently
      dt-bindings: PCI: Add DT bindings for PCI designware EP mode
      PCI: dwc: designware: Add EP mode support
      Documentation: PCI: Add binding documentation for pci-test endpoint function
      ixgbe: Use pcie_flr() instead of duplicating it
      IB/hfi1: Use pcie_flr() instead of duplicating it
      PCI: imx6: Fix spelling mistake: "contol" -> "control"
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    857f864 View commit details
    Browse the repository at this point in the history
  118. Revert "ipv4: restore rt->fi for reference counting"

    This reverts commit 82486aa.
    
    As implemented, this causes dangling netdevice refs.
    
    Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    32f1bc0 View commit details
    Browse the repository at this point in the history
  119. Merge tags 'for-linus' and 'for-next' of git://git.kernel.org/pub/scm…

    …/linux/kernel/git/dledford/rdma
    
    Pull more rdma updates from Doug Ledford:
     "As mentioned in my first pull request, this is the subsequent pull
      requests I had. This is all I have, and in fact this cleans out the
      RDMA subsystem's entire patchworks queue of kernel changes that are
      ready to go (well, it did for the weekend anyway, a few new patches
      are in, but they'll be coming during the -rc cycle).
    
      The first tag contains a single patch that would have conflicted if
      taken from my tree or DaveM's tree as it needed our trees merged to
      come cleanly.
    
      The second tag contains the patch series from Intel plus three other
      stragllers that came in late last week. I took them because it allowed
      me to legitimately claim that the RDMA patchworks queue was, for a
      short time, 100% cleared of all waiting kernel patches, woohoo! :-).
    
      I have it under my for-next tag, so it did get 0day and linux- next
      over the end of last week, and linux-next did show one minor conflict.
    
      Summary:
    
      'for-linus' tag:
       - mlx5/IPoIB fixup patch
    
      'for-next' tag:
       - the hfi1 15 patch set that landed late
       - IPoIB get_link_ksettings which landed late because I asked for a
         respin
       - one late rxe change
       - one -rc worthy fix that's in early"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
      IB/mlx5: Enable IPoIB acceleration
    
    * tag 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
      rxe: expose num_possible_cpus() cnum_comp_vectors
      IB/rxe: Update caller's CRC for RXE_MEM_TYPE_DMA memory type
      IB/hfi1: Clean up on context initialization failure
      IB/hfi1: Fix an assign/ordering issue with shared context IDs
      IB/hfi1: Clean up context initialization
      IB/hfi1: Correctly clear the pkey
      IB/hfi1: Search shared contexts on the opened device, not all devices
      IB/hfi1: Remove atomic operations for SDMA_REQ_HAVE_AHG bit
      IB/hfi1: Use filedata rather than filepointer
      IB/hfi1: Name function prototype parameters
      IB/hfi1: Fix a subcontext memory leak
      IB/hfi1: Return an error on memory allocation failure
      IB/hfi1: Adjust default eager_buffer_size to 8MB
      IB/hfi1: Get rid of divide when setting the tx request header
      IB/hfi1: Fix yield logic in send engine
      IB/hfi1, IB/rdmavt: Move r_adefered to r_lock cache line
      IB/hfi1: Fix checks for Offline transient state
      IB/ipoib: add get_link_ksettings in ethtool
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    3341713 View commit details
    Browse the repository at this point in the history
  120. Merge tag 'trace-v4.12-2' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/rostedt/linux-trace
    
    Pull more tracing updates from Steven Rostedt:
     "These are three simple changes.
    
      The first one is just a switch from using strcpy() to strlcpy().
      Someone thought that it may cause an overflow bug, but since it only
      copies comms into a pre-allocated array of TASK_COMM_LEN, and no comm
      should ever be bigger than that, nor not end with a nul character,
      this change is more of a safety precaution than fixing anything that
      is actually broken.
    
      The other two changes are simply cleaning and optimizing some code"
    
    * tag 'trace-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
      ftrace: Simplify ftrace_match_record() even more
      ftrace: Remove an unneeded condition
      tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline()
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    00d9593 View commit details
    Browse the repository at this point in the history
  121. Merge tag 'linux-kselftest-4.12-rc1' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/shuah/linux-kselftest
    
    Pull kselftest updates from Shuah Khan:
     "This update consists of:
    
       - important fixes for build failures and clean target related
         warnings to address regressions introduced in commit 88baa78
         ("selftests: remove duplicated all and clean target")
    
       - several minor spelling fixes in and log messages and comment
         blocks.
    
       - Enabling configs for better test coverage in ftrace, vm, and
         cpufreq tests.
    
       - .gitignore changes"
    
    * tag 'linux-kselftest-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (26 commits)
      selftests: x86: add missing executables to .gitignore
      selftests: watchdog: accept multiple params on command line
      selftests: create cpufreq kconfig fragments
      selftests: x86: override clean in lib.mk to fix warnings
      selftests: sync: override clean in lib.mk to fix warnings
      selftests: splice: override clean in lib.mk to fix warnings
      selftests: gpio: fix clean target to remove all generated files and dirs
      selftests: add gpio generated files to .gitignore
      selftests: powerpc: override clean in lib.mk to fix warnings
      selftests: gpio: override clean in lib.mk to fix warnings
      selftests: futex: override clean in lib.mk to fix warnings
      selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
      selftests: splice: fix clean target to not remove default_file_splice_read.sh
      selftests: gpio: add config fragment for gpio-mockup
      selftests: breakpoints: allow to cross-compile for aarch64/arm64
      selftests/Makefile: Add missed PHONY targets
      selftests/vm/run_vmtests: Fix wrong comment
      selftests/Makefile: Add missed closing `"` in comment
      selftests/vm/run_vmtests: Polish output text
      selftests/timers: fix spelling mistake: "Asynchronous"
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    2868b25 View commit details
    Browse the repository at this point in the history
  122. DECnet: Use container_of() for embedded struct

    Instead of a direct cross-type cast, use conatiner_of() to locate
    the embedded structure, even in the face of future struct layout
    randomization.
    
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    kees authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    f92ceb0 View commit details
    Browse the repository at this point in the history
  123. drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comp…

    …arison
    
    Use time_after() for time comparison with the new fix.
    
    Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    karimeshapaLinux authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    4c19e2f View commit details
    Browse the repository at this point in the history
  124. net/mlx4_en: Change the error print to debug print

    The error print within mlx4_en_calc_rx_buf() should be a debug print.
    
    Fixes: 51151a1 ('mlx4: allow order-0 memory allocations in RX path')
    Signed-off-by: Kamal Heib <kamalh@mellanox.com>
    Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Kamal Heib authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    505a924 View commit details
    Browse the repository at this point in the history
  125. net/mlx4_en: Avoid adding steering rules with invalid ring

    Inserting steering rules with illegal ring is an invalid operation,
    block it.
    
    Fixes: 8206728 ('net/mlx4_en: Manage flow steering rules with ethtool')
    Signed-off-by: Talat Batheesh <talatb@mellanox.com>
    Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    talatb authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    89c5576 View commit details
    Browse the repository at this point in the history
  126. net/mlx4_core: Reduce harmless SRIOV error message to debug level

    Under SRIOV resource management, extra counters are allocated to VFs
    from a free pool. If that pool is empty, the ALLOC_RES command for
    a counter resource fails -- and this generates a misleading error
    message in the message log.
    
    Under SRIOV, each VF is allocated (i.e., guaranteed) 2 counters --
    one counter per port. For ETH ports, the RoCE driver requests an
    additional counter (above the guaranteed counters). If that request
    fails, the VF RoCE driver simply uses the default (i.e., guaranteed)
    counter for that port.
    
    Thus, failing to allocate an additional counter does not constitute
    a  problem, and the error message on the PF when this occurs should
    be reduced to debug level.
    
    Finally, to identify the situation that the reason for the failure is
    that no resources are available to grant to the VF, we modified the
    error returned by mlx4_grant_resource to -EDQUOT (Quota exceeded),
    which more accurately describes the error.
    
    Fixes: c3abb51 ("IB/mlx4: Add RoCE/IB dedicated counters")
    Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
    Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jack Morgenstein authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    83bd511 View commit details
    Browse the repository at this point in the history
  127. Merge branch 'mlx4-misc-fixes'

    Tariq Toukan says:
    
    ====================
    mlx4 misc fixes
    
    This patchset contains misc bug fixes from the team
    to the mlx4 Core and Eth drivers.
    
    Series generated against net commit:
    32f1bc0 Revert "ipv4: restore rt->fi for reference counting"
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    cf68017 View commit details
    Browse the repository at this point in the history
  128. qede: Fix XDP memory leak on unload

    When (re|un)loading, Tx-queues belonging to XDP would not get freed.
    
    Fixes: cb6aeb0 ("qede: Add support for XDP_TX")
    Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
    Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Suddarsana Reddy Kalluru authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    92c43eb View commit details
    Browse the repository at this point in the history
  129. qed: Fix VF removal sequence

    After previos changes in HW-stop scheme, VFs stopped sending CLOSE
    messages to their PFs when they unload.
    
    Fixes: 1226337 ("qed: Correct HW stop flow")
    Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Mintz, Yuval authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    5f027d7 View commit details
    Browse the repository at this point in the history
  130. qed: Tell QM the number of tasks

    Driver doesn't pass the number of tasks to the QM init logic
    which would cause back-pressure in scenarios requiring many tasks
    [E.g., using max MRs] and thus reduced performance.
    
    Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Mintz, Yuval authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c9f0523 View commit details
    Browse the repository at this point in the history
  131. qed: Correct doorbell configuration for !4Kb pages

    When configuring the doorbell DPI address, driver aligns the start
    address to 4KB [HW-pages] instead of host PAGE_SIZE.
    As a result, RoCE applications might receive addresses which are
    unaligned to pages [when PAGE_SIZE > 4KB], which is a security risk.
    
    Fixes: 51ff172 ("qed: Add support for RoCE hw init")
    Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
    Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Ram Amrani authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    a82dadb View commit details
    Browse the repository at this point in the history
  132. qede: Split PF/VF ndos.

    PFs and VFs share the same structure of NDOs today,
    and the VFs explicitly fails the ndo_xdp() callback stating
    it doesn't support XDP.
    
    This results in lots of:
    
      [qede_xdp:1032(enp131s2)]VFs don't support XDP
      ------------[ cut here ]------------
      WARNING: CPU: 4 PID: 1426 at net/core/rtnetlink.c:1637 rtnl_dump_ifinfo+0x354/0x3c0
      ...
      Call Trace:
        ? __alloc_skb+0x9b/0x1d0
        netlink_dump+0x122/0x290
        netlink_recvmsg+0x27d/0x430
        sock_recvmsg+0x3d/0x50
      ...
    
    As every dump request for the VF interface info would fail due to
    rtnl_xdp_fill() returning an error code.
    
    To resolve this, introduce a subset of the NDOs meant for the VF
    in a seperate structure and register that one instead for VFs,
    and omit the ndo_xdp initialization.
    
    Fixes: 40b8c45 ("qede: Prevent VFs from using XDP")
    Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Mintz, Yuval authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    be47c55 View commit details
    Browse the repository at this point in the history
  133. Merge branch 'qed-general-fixes'

    Yuval Mintz says:
    
    ====================
    qed*: General fixes
    
    This series contain several fixes for qed and qede.
    
     - #1 [and ~#5] relate to XDP cleanups
     - #2 and #5 correct VF behavior
     - #3 and #4 fix and add missing configurations needed for RoCE & storage
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e735da5 View commit details
    Browse the repository at this point in the history
  134. proc: try to remove use of FOLL_FORCE entirely

    We fixed the bugs in it, but it's still an ugly interface, so let's see
    if anybody actually depends on it.  It's entirely possible that nothing
    actually requires the whole "punch through read-only mappings"
    semantics.
    
    For example, gdb definitely uses the /proc/<pid>/mem interface, but it
    looks like it mainly does it for regular reads of the target (that don't
    need FOLL_FORCE), and looking at the gdb source code seems to fall back
    on the traditional ptrace(PTRACE_POKEDATA) interface if it needs to.
    
    If this breaks something, I do have a (more complex) version that only
    enables FOLL_FORCE when somebody has PTRACE_ATTACH'ed to the target,
    like the comment here used to say ("Maybe we should limit FOLL_FORCE to
    actual ptrace users?").
    
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8ee74a9 View commit details
    Browse the repository at this point in the history
  135. Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/viro/vfs
    
    Pull vfs fix from Al Viro:
     "Braino fix for iov_iter_revert() misuse"
    
    * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
      fix braino in generic_file_read_iter()
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    339fbf6 View commit details
    Browse the repository at this point in the history
  136. Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/viro/vfs
    
    Pull misc vfs updates from Al Viro:
     "Assorted bits and pieces from various people. No common topic in this
      pile, sorry"
    
    * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
      fs/affs: add rename exchange
      fs/affs: add rename2 to prepare multiple methods
      Make stat/lstat/fstatat pass AT_NO_AUTOMOUNT to vfs_statx()
      fs: don't set *REFERENCED on single use objects
      fs: compat: Remove warning from COMPATIBLE_IOCTL
      remove pointless extern of atime_need_update_rcu()
      fs: completely ignore unknown open flags
      fs: add a VALID_OPEN_FLAGS
      fs: remove _submit_bh()
      fs: constify tree_descr arrays passed to simple_fill_super()
      fs: drop duplicate header percpu-rwsem.h
      fs/affs: bugfix: Write files greater than page size on OFS
      fs/affs: bugfix: enable writes on OFS disks
      fs/affs: remove node generation check
      fs/affs: import amigaffs.h
      fs/affs: bugfix: make symbolic links work again
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    11fbf53 View commit details
    Browse the repository at this point in the history
  137. Merge tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/arm/arm-soc
    
    Pull misc ARM SoC fixes from Olof Johansson:
     "ARM SoC non-urgent fixes for merge window
    
      Smaller patches that didn't seem to find a home in other branches, and
      low-priority fixes from late in the merge window. A number of these
      are MAINTAINER updates, it seems.
    
      Highlights:
    
       * Maintainers:
         - Remove Alexandre Courbot and Stephen Warren from Tegra
           maintainership, add Jon Hunter
         - Remove Stephen Warren and add Stefan Wahren to bcm2835
         - Tweaks for file flagging for Marvell Dove
    
       * Fixes:
         - For two non-common-clk platform, handle clk_disable with NULL arg
         - Remove redundant Kconfig select for Oxnas"
    
    * tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
      ARM: mmp: let clk_disable() return immediately if clk is NULL
      ARM: w90x900: let clk_disable() return immediately if clk is NULL
      MAINTAINERS: Add file patterns for dove device tree bindings
      ARM: oxnas: remove redundant select CPU_V6K
      MAINTAINERS: tegra: Remove self as maintainer
      MAINTAINERS: tegra: Replace Stephen with Jon
      MAINTAINERS: Add Stefan Wahren to bcm2835.
      MAINTAINERS: remove swarren from bcm2835
      MAINTAINERS: Add Jon Mason to BCM5301X maintainers
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e07e368 View commit details
    Browse the repository at this point in the history
  138. Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/arm/arm-soc
    
    Pull ARM SoC platform updates from Olof Johansson:
     "SoC platform changes (arch/arm/mach-*). This merge window, the bulk is
      for a few platforms:
    
      Gemini:
       - Legacy platform that Linus Walleij has converted to multiplatform
         and DT, so a handful of various tweaks there, removal of some old
         stale support, etc.
    
      Atmel AT91:
       - Fixup of various power management related pieces
       - Move of SoC detection to a drivers/soc driver instead
    
      ST Micro STM32:
       - New SoC support: STM32H743
    
      TI platforms:
       - More driver support for Davinci (SATA in particular)
       - Removal of some old stale hwmod files (linkspace platform)
    
      Misc:
       - A couple of smaller patches for i.MX, sunxi, hisi"
    
    * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (57 commits)
      ARM: davinci: Add clock for CPPI 4.1 DMA engine
      ARM: mxs: add support for I2SE Duckbill 2 boards
      MAINTAINERS: Update the Allwinner sunXi entry
      ARM: i.MX25: globally disable supervisor protect
      ARM: at91: move SoC detection to its own driver
      ARM: at91: pm: correct typo
      ARM: at91: pm: Remove at91_pm_set_standby
      ARM: at91: pm: Merge all at91sam9*_pm_init
      ARM: at91: pm: Tie the USB clock mask to the pmc
      ARM: at91: pm: Tie the memory controller type to the ramc id
      ARM: at91: pm: Workaround DDRSDRC self-refresh bug with LPDDR1 memories.
      ARM: at91: pm: Simplify at91rm9200_standby
      ARM: at91: pm: Use struct at91_pm_data in pm_suspend.S
      ARM: at91: pm: Move global variables into at91_pm_data
      ARM: at91: pm: Move at91_ramc_read/write to pm.c
      ARM: at91: pm: Cleanup headers
      MAINTAINERS: Add memory drivers to AT91 entry
      MAINTAINERS: Update AT91 entry
      ARM: davinci: add pata_bk3710 libata driver support
      ARM: OMAP2+: mark omap_init_rng as __init
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8d648aa View commit details
    Browse the repository at this point in the history
  139. Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/arm/arm-soc
    
    Pull ARM Device-tree updates from Olof Johansson:
     "Device-tree continues to see lots of updates. The majority of patches
      here are smaller changes for new hardware on existing platforms, and
      there are a few larger changes worth pointing out.
    
      Major new platforms:
    
       - Gemini has been ported to DT, so a handful of "new" platforms moved
         over from board files
    
       - Rockchip RK3288 support for Tinkerboard and Phytec phyCORE-RK3288
         SoM and RDK
    
       - A bunch of embedded platforms, several Linksys platforms, Synology
         DS116,
    
       - Motorola Droid4 (really old OMAP-based phone) support is added.
    
      Some refactorings, i.e. Allwinner H3/H5 support is commonalized.
    
      And lots of smaller changes, cleanups, etc. See shortlog for more
      description
    
      We're adding ability to cross-include DT files between arm and arm64,
      by creating appropriate links in the dt-include directory, and using
      arm/ and arm64/ as include prefixes. This will avoid other local hacks
      such as per-file links between the two arch trees (this broke for
      external mirroring of DT contents). Now they can just provide their
      own appropriate dt-include hierarcy per platform"
    
    * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (349 commits)
      ARM: dts: exynos: Use - instead of @ for DT OPP entries
      arm: spear6xx: add DT description of the ADC on SPEAr600
      arm: spear6xx: remove unneeded pinctrl properties in spear600-evb
      arm: spear6xx: switch spear600-evb to the new flash partition DT binding
      arm: spear6xx: fix spaces in spear600-evb.dts
      arm: spear6xx: use node labels in spear600-evb.dts
      arm: spear6xx: add labels to various nodes in spear600.dtsi
      ARM: dts: vexpress: fix few unit address format warnings
      ARM: dts: at91: sama5d3_xplained: not all ADC channels are available
      ARM: dts: at91: sama5d3_xplained: fix ADC vref
      ARM: dts: at91: add envelope detector mux to the Axentia TSE-850
      ARM: dts: armada-38x: label USB and SATA nodes
      ARM: dts: imx6q-utilite-pro: add hpd gpio
      ARM: dts: imx6qp-sabresd: Set reg_arm regulator supply
      ARM: dts: imx6qdl-sabresd: Set LDO regulator supply
      ARM: dts: imx: add Gateworks Ventana GW5903 support
      ARM: dts: i.MX25: add AIPS control registers
      ARM: dts: imx7-colibri: add Carrier Board 3.3V/5V regulators
      ARM: dts: imx7-colibri: remove 1.8V fixed regulator
      ARM: dts: imx7-colibri: allow to disable Ethernet rail
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    85d6049 View commit details
    Browse the repository at this point in the history
  140. Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/arm/arm-soc
    
    Pull ARM: SoC defconfig updates from Olof Johansson:
     "We've traditionally kept defconfig updates in a separate branch, often
      to encourage submaintainers to handle those patches separately to
      avoid conflicts on the shared files. The amount of changes seem to be
      decreasing though, so we might rethink how we handle this going
      forward.
    
      There really isn't much to write about here. The bulk of changes here
      are enabling drivers for whatever platforms the hardware is found on
      (and multi-configs)"
    
    * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (30 commits)
      multi_v7_defconfig: make Rockchip usb2-phy built-in
      ARM: omap2plus_defconfig: Enable droid 4 devices
      ARM: omap2plus_defconfig: Add QMI, ACM and PPP as loadable modules
      ARM: configs: aspeed: Add new drivers
      ARM: configs: aspeed: Update configs for BMC systems
      ARM: omap2plus_defconfig: Enable TI Ethernet PHY
      ARM: configs: Add new config fragment to change RAM start point
      ARM: configs: stm32: Add I2C support
      multi_v7_defconfig: make Rockchip DRM drivers built-in
      ARM: configs: stm32: Set CPU_V7M_NUM_IRQ to max value
      ARM: imx_v6_v7_defconfig: Select SMSC_PHY
      ARM: davinci_all_defconfig: convert to use libata PATA
      ARM: qcom_defconfig: Enable Qualcomm remoteproc and related drivers
      ARM: omap2plus_defconfig: enable ahci-dm816 module
      arm: set CONFIG_MMC_BCM2835=y in bcm2835_defconfig and multi_v7_defconfig
      ARM: bcm2835: Enable missing CMA settings for VC4 driver
      ARM: socfpga: updates for socfpga_defconfig
      ARM: imx_v6_v7_defconfig: Select hid-multitouchdriver
      ARM: imx_v6_v7_defconfig: Select max11801_ts touchscreen driver
      ARM: exynos_defconfig: Increase CONFIG_CMA_SIZE_MBYTES to 96
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c81ee18 View commit details
    Browse the repository at this point in the history
  141. Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/arm/arm-soc
    
    Pull ARM SoC driver updates from Olof Johansson:
     "Driver updates for ARM SoCs:
    
      Reset subsystem, merged through arm-soc by tradition:
       - Make bool drivers explicitly non-modular
       - New support for i.MX7 and Arria10 reset controllers
    
      PATA driver for Palmchip BK371 (acked by Tejun)
    
      Power domain drivers for i.MX (GPC, GPCv2)
       - Moved out of mach-imx for GPC
       - Bunch of tweaks, fixes, etc
    
      PMC support for Tegra186
    
      SoC detection support for Renesas RZ/G1H and RZ/G1N
    
      Move Tegra flow controller driver from mach directory to drivers/soc
       - (Power management / CPU power driver)
    
      Misc smaller tweaks for other platforms"
    
    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits)
      soc: pm-domain: Fix the mangled urls
      soc: renesas: rcar-sysc: Add support for R-Car H3 ES2.0
      soc: renesas: rcar-sysc: Add support for fixing up power area tables
      soc: renesas: Register SoC device early
      soc: imx: gpc: add workaround for i.MX6QP to the GPC PD driver
      dt-bindings: imx-gpc: add i.MX6 QuadPlus compatible
      soc: imx: gpc: add defines for domain index
      soc: imx: Add GPCv2 power gating driver
      dt-bindings: Add GPCv2 power gating driver
      ARM/clk: move the ICST library to drivers/clk
      ARM: plat-versatile: remove stale clock header
      ARM: keystone: Drop PM domain support for k2g
      soc: ti: Add ti_sci_pm_domains driver
      dt-bindings: Add TI SCI PM Domains
      PM / Domains: Do not check if simple providers have phandle cells
      PM / Domains: Add generic data pointer to genpd data struct
      soc/tegra: Add initial flowctrl support for Tegra132/210
      soc/tegra: flowctrl: Add basic platform driver
      soc/tegra: Move Tegra flowctrl driver
      ARM: tegra: Remove unnecessary inclusion of flowctrl header
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    0160e00 View commit details
    Browse the repository at this point in the history
  142. Merge tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/arm/arm-soc
    
    Pull ARM SoC 64-bit changes from Olof Johansson:
     "Changes to platform code for 64-bit ARM platforms.
    
      Most of these are small changes to the one defconfig we use on arm64
      (no per-platform configs there), to enable new drivers.
    
      There are also a few other changes. Broadcom sold off their 'Vulcan'
      design to Cavium, where it is now called ThunderX2. While we normally
      don't rename stuff based on marketing's whims, it seemed appropriate
      to bring in renames on a few things such as MAINTAINERS, etc"
    
    * tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
      arm64: sunxi: always enable reset controller
      arm64: defconfig: enable the Safexcel crypto engine as a module
      arm64: configs: enable SDHCI driver for Xenon
      MAINTAINERS: Broadcom Vulcan is now Cavium ThunderX2
      arm64: defconfig: add Allwinner USB PHY
      arm64: defconfig: enable MVPP2
      arm64: defconfig: Enable video, DRM and LPASS drivers for Exynos5433 and Exynos7
      arm64: exynos: Enable Exynos PMU and PM domains drivers
      arm64: only select PINCTRL for Allwinner platforms
      arm64: set CONFIG_MMC_BCM2835=y in defconfig
      arm64: defconfig: enable I2C_PXA
      arm64: defconfig: enable MVNETA
      ARM64: defconfig: enable the leds-pwm driver and default-on trigger
      arm64: defconfig: Enable SH Mobile I2C controller
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    0ff4c01 View commit details
    Browse the repository at this point in the history
  143. Merge tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/arm/arm-soc
    
    Pull ARM 64-bit DT updates from Olof Johansson:
     "Device-tree updates for arm64 platforms. Just as with 32-bit, a bunch
      of smaller changes, but also some new platforms that are worth
      mentioning:
    
       - Rockchip RK3399 platforms for Chromebooks, including Samsung
         Chromebook Plus (Kevin)
    
       - Orange Pi PC2 (Allwinner H5)
    
       - Freescale LS2088A and LS1088A SoCs
    
       - Expanded support for Nvidia Tegra186 (and Jetson TX2)"
    
    * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (180 commits)
      arm64: dts: Add basic DT to support Spreadtrum's SP9860G
      arm64: dts: exynos: Use - instead of @ for DT OPP entries
      arm64: dts: exynos: Add support for s6e3hf2 panel device on TM2e board
      arm64: dts: juno: add information about L1 and L2 caches
      arm64: dts: juno: fix few unit address format warnings
      arm64: marvell: dts: enable the crypto engine on the Armada 8040 DB
      arm64: marvell: dts: enable the crypto engine on the Armada 7040 DB
      arm64: marvell: dts: add crypto engine description for 7k/8k
      arm64: dts: marvell: add sdhci support for Armada 7K/8K
      arm64: dts: marvell: add eMMC support for Armada 37xx
      arm64: dts: hisi: add pinctrl dtsi file for HiKey960 development board
      arm64: dts: hisi: add drive strength levels of the pins for Hi3660 SoC
      arm64: dts: hisi: enable the NIC and SAS for the hip07-d05 board
      arm64: dts: hisi: add SAS nodes for the hip07 SoC
      arm64: dts: hisi: add RoCE nodes for the hip07 SoC
      arm64: dts: hisi: add network related nodes for the hip07 SoC
      arm64: dts: hisi: add mbigen nodes for the hip07 SoC
      arm64: dts: rockchip: fix the memory size of PX5 Evaluation board
      arm64: dts: hisilicon: add dts files for hi3798cv200-poplar board
      dt-bindings: arm: hisilicon: add bindings for hi3798cv200 SoC and Poplar board
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c6778ff View commit details
    Browse the repository at this point in the history
  144. Merge tag 'arc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/vgupta/arc
    
    Pull ARC updates from Vineet Gupta:
    
     - AXS10x platform clk updates for I2S, PGU
    
     - add region based cache flush operation for ARCv2 cores
    
     - enforce PAE40 dependency on HIGHMEM
    
     - ptrace support for additional regs in ARCv2 cores
    
     - fix build failure in linux-next dut to a header include ordering
       change
    
    * tag 'arc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
      Revert "ARCv2: Allow enabling PAE40 w/o HIGHMEM"
      ARC: mm: fix build failure in linux-next for UP builds
      ARCv2: ptrace: provide regset for accumulator/r30 regs
      elf: Add ARCv2 specific core note section
      ARCv2: mm: micro-optimize region flush generated code
      ARCv2: mm: Merge 2 updates to DC_CTRL for region flush
      ARCv2: mm: Implement cache region flush operations
      ARC: mm: Move full_page computation into cache version agnostic wrapper
      arc: axs10x: Fix ARC PGU default clock frequency
      arc: axs10x: Add DT bindings for I2S audio playback
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    4a1e31c View commit details
    Browse the repository at this point in the history
  145. sparc: use memdup_user_nul in sun4m LED driver

    Use memdup_user_nul() helper instead of open-coding to simplify the code.
    
    Signed-off-by: Geliang Tang <geliangtang@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    geliangtang authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    aed74ea View commit details
    Browse the repository at this point in the history
  146. sparc64: fix fault handling in NGbzero.S and GENbzero.S

    When any of the functions contained in NGbzero.S and GENbzero.S
    vector through *bzero_from_clear_user, we may end up taking a
    fault when executing one of the store alternate address space
    instructions. If this happens, the exception handler does not
    restore the %asi register.
    
    This commit fixes the issue by introducing a new exception
    handler that ensures the %asi register is restored when
    a fault is handled.
    
    Orabug: 25577560
    
    Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
    Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
    Reviewed-by: Babu Moger <babu.moger@oracle.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Dave Aldridge authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    3c7f622 View commit details
    Browse the repository at this point in the history
  147. dccp/tcp: do not inherit mc_list from parent

    syzkaller found a way to trigger double frees from ip_mc_drop_socket()
    
    It turns out that leave a copy of parent mc_list at accept() time,
    which is very bad.
    
    Very similar to commit 8b485ce ("tcp: do not inherit
    fastopen_req from parent")
    
    Initial report from Pray3r, completed by Andrey one.
    Thanks a lot to them !
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: Pray3r <pray3r.z@gmail.com>
    Reported-by: Andrey Konovalov <andreyknvl@google.com>
    Tested-by: Andrey Konovalov <andreyknvl@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Eric Dumazet authored and davem330 committed May 9, 2017
    Configuration menu
    Copy the full SHA
    657831f View commit details
    Browse the repository at this point in the history
  148. Merge tag 'iommu-updates-v4.12' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/joro/iommu
    
    Pull IOMMU updates from Joerg Roedel:
    
     - code optimizations for the Intel VT-d driver
    
     - ability to switch off a previously enabled Intel IOMMU
    
     - support for 'struct iommu_device' for OMAP, Rockchip and Mediatek
       IOMMUs
    
     - header optimizations for IOMMU core code headers and a few fixes that
       became necessary in other parts of the kernel because of that
    
     - ACPI/IORT updates and fixes
    
     - Exynos IOMMU optimizations
    
     - updates for the IOMMU dma-api code to bring it closer to use per-cpu
       iova caches
    
     - new command-line option to set default domain type allocated by the
       iommu core code
    
     - another command line option to allow the Intel IOMMU switched off in
       a tboot environment
    
     - ARM/SMMU: TLB sync optimisations for SMMUv2, Support for using an
       IDENTITY domain in conjunction with DMA ops, Support for SMR masking,
       Support for 16-bit ASIDs (was previously broken)
    
     - various other small fixes and improvements
    
    * tag 'iommu-updates-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (63 commits)
      soc/qbman: Move dma-mapping.h include to qman_priv.h
      soc/qbman: Fix implicit header dependency now causing build fails
      iommu: Remove trace-events include from iommu.h
      iommu: Remove pci.h include from trace/events/iommu.h
      arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops()
      ACPI/IORT: Fix CONFIG_IOMMU_API dependency
      iommu/vt-d: Don't print the failure message when booting non-kdump kernel
      iommu: Move report_iommu_fault() to iommu.c
      iommu: Include device.h in iommu.h
      x86, iommu/vt-d: Add an option to disable Intel IOMMU force on
      iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed
      iommu/arm-smmu: Correct sid to mask
      iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
      iommu: Make iommu_bus_notifier return NOTIFY_DONE rather than error code
      omap3isp: Remove iommu_group related code
      iommu/omap: Add iommu-group support
      iommu/omap: Make use of 'struct iommu_device'
      iommu/omap: Store iommu_dev pointer in arch_data
      iommu/omap: Move data structures to omap-iommu.h
      iommu/omap: Drop legacy-style device support
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    28b4780 View commit details
    Browse the repository at this point in the history
  149. Merge tag 'pwm/for-4.12-rc1' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/thierry.reding/linux-pwm
    
    Pull pwm updates from Thierry Reding:
     "Adds a new driver for the PWM controller found on MediaTek SoCs and
      extends support for the Atmel PWM controller to include the SAMA5D2.
    
      Some existing drivers have been migrated to the atomic API and a few
      others see miscellaneous improvements"
    
    * tag 'pwm/for-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
      pwm: tegra: Read PWM clock source rate in driver init
      pwm: pca9685: Fix GPIO-only operation
      pwm: mediatek: Don't explicitly set .owner
      pwm: tegra: Avoid potential overflow for short periods
      pwm: tegra: Add support to configure pin state in suspends/resume
      pwm: tegra: Add DT binding details to configure pin in suspends/resume
      pwm: tegra: Increase precision in PWM rate calculation
      pwm: tegra: Use DIV_ROUND_CLOSEST_ULL() instead of local implementation
      pwm: Add MediaTek PWM support
      dt-bindings: pwm: Add MediaTek PWM bindings
      pwm: atmel: Enable PWM on sama5d2
      pwm: atmel: Switch to atomic PWM
      pwm: atmel-hlcdc: Implement the suspend/resume hooks
      pwm: atmel-hlcdc: Convert to the atomic PWM API
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    ecc721a View commit details
    Browse the repository at this point in the history
  150. Merge tag 'dmaengine-4.12-rc1' of git://git.infradead.org/users/vkoul…

    …/slave-dma
    
    Pull dmaengine updates from Vinod Koul:
     "This time again a smaller update consisting of:
    
       - support for TI DA8xx dma controller and updates to the cppi driver
    
       - updates on bunch of drivers like xilinx, pl08x, stm32-dma, mv_xor,
         ioat, dmatest"
    
    * tag 'dmaengine-4.12-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (35 commits)
      dmaengine: pl08x: remove lock documentation
      dmaengine: pl08x: fix pl08x_dma_chan_state documentation
      dmaengine: pl08x: Use the BIT() macro consistently
      dmaengine: pl080: Fix some missing kerneldoc
      dmaengine: pl080: Cut some unused defines
      dmaengine: dmatest: Add check for supported buffer count (sg_buffers)
      dmaengine: dmatest: Select DMA_ENGINE_RAID as its needed for the slave_sg test
      dmaengine: virt-dma: Convert to use list_for_each_entry_safe()
      dma-debug: use offset_in_page() macro
      dmaengine: mv_xor: use offset_in_page() macro
      dmaengine: dmatest: use offset_in_page() macro
      dmaengine: sun4i: fix invalid argument
      dmaengine: ioat: use setup_timer
      dmaengine: cppi41: Fix an Oops happening in cppi41_dma_probe()
      dmaengine: pl330: remove pdata based initialization
      dmaengine: cppi: fix build error due to bad variable
      dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped
      dmaengine: cppi41: use managed functions devm_*()
      dmaengine: cppi41: fix cppi41_dma_tx_status() logic
      dmaengine: qcom_hidma: pause the channel on shutdown
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    4879b7a View commit details
    Browse the repository at this point in the history
  151. Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

    Pull networking fixes from David Miller:
    
     1) Fix multiqueue in stmmac driver on PCI, from Andy Shevchenko.
    
     2) cdc_ncm doesn't actually fully zero out the padding area is
        allocates on TX, from Jim Baxter.
    
     3) Don't leak map addresses in BPF verifier, from Daniel Borkmann.
    
     4) If we randomize TCP timestamps, we have to do it everywhere
        including SYN cookies. From Eric Dumazet.
    
     5) Fix "ethtool -S" crash in aquantia driver, from Pavel Belous.
    
     6) Fix allocation size for ntp filter bitmap in bnxt_en driver, from
        Dan Carpenter.
    
     7) Add missing memory allocation return value check to DSA loop driver,
        from Christophe Jaillet.
    
     8) Fix XDP leak on driver unload in qed driver, from Suddarsana Reddy
        Kalluru.
    
     9) Don't inherit MC list from parent inet connection sockets, another
        syzkaller spotted gem. Fix from Eric Dumazet.
    
    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
      dccp/tcp: do not inherit mc_list from parent
      qede: Split PF/VF ndos.
      qed: Correct doorbell configuration for !4Kb pages
      qed: Tell QM the number of tasks
      qed: Fix VF removal sequence
      qede: Fix XDP memory leak on unload
      net/mlx4_core: Reduce harmless SRIOV error message to debug level
      net/mlx4_en: Avoid adding steering rules with invalid ring
      net/mlx4_en: Change the error print to debug print
      drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison
      DECnet: Use container_of() for embedded struct
      Revert "ipv4: restore rt->fi for reference counting"
      net: mdio-mux: bcm-iproc: call mdiobus_free() in error path
      net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control
      ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf
      net: cdc_ncm: Fix TX zero padding
      stmmac: pci: split out common_default_data() helper
      stmmac: pci: RX queue routing configuration
      stmmac: pci: TX and RX queue priority configuration
      stmmac: pci: set default number of rx and tx queues
      ...
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    50fb55d View commit details
    Browse the repository at this point in the history
  152. Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

    Pull sparc updates from David Miller:
     "sparc changes, including a bug fix for handling exceptions during
      bzero on some sparc64 cpus"
    
    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
      sparc64: fix fault handling in NGbzero.S and GENbzero.S
      sparc: use memdup_user_nul in sun4m LED driver
      sparc: Remove redundant tests in boot_flags_init().
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    7fc22f4 View commit details
    Browse the repository at this point in the history
  153. Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide

    Pull IDE updates from David Miller:
     "Two small cleanups in the IDE layer"
    
    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
      ide: don't call memcpy with the same source and destination
      ide: use setup_timer
    torvalds committed May 9, 2017
    Configuration menu
    Copy the full SHA
    56868a4 View commit details
    Browse the repository at this point in the history