1. 11 May, 2018 12 commits
    • Chuck Lever's avatar
      svcrdma: Persistently allocate and DMA-map Receive buffers · 3316f063
      Chuck Lever authored
      The current Receive path uses an array of pages which are allocated
      and DMA mapped when each Receive WR is posted, and then handed off
      to the upper layer in rqstp::rq_arg. The page flip releases unused
      pages in the rq_pages pagelist. This mechanism introduces a
      significant amount of overhead.
      
      So instead, kmalloc the Receive buffer, and leave it DMA-mapped
      while the transport remains connected. This confers a number of
      benefits:
      
      * Each Receive WR requires only one receive SGE, no matter how large
        the inline threshold is. This helps the server-side NFS/RDMA
        transport operate on less capable RDMA devices.
      
      * The Receive buffer is left allocated and mapped all the time. This
        relieves svc_rdma_post_recv from the overhead of allocating and
        DMA-mapping a fresh buffer.
      
      * svc_rdma_wc_receive no longer has to DMA unmap the Receive buffer.
        It has to DMA sync only the number of bytes that were received.
      
      * svc_rdma_build_arg_xdr no longer has to free a page in rq_pages
        for each page in the Receive buffer, making it a constant-time
        function.
      
      * The Receive buffer is now plugged directly into the rq_arg's
        head[0].iov_vec, and can be larger than a page without spilling
        over into rq_arg's page list. This enables simplification of
        the RDMA Read path in subsequent patches.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      3316f063
    • Chuck Lever's avatar
      svcrdma: Preserve Receive buffer until svc_rdma_sendto · 3a88092e
      Chuck Lever authored
      Rather than releasing the incoming svc_rdma_recv_ctxt at the end of
      svc_rdma_recvfrom, hold onto it until svc_rdma_sendto.
      
      This permits the contents of the Receive buffer to be preserved
      through svc_process and then referenced directly in sendto as it
      constructs Write and Reply chunks to return to the client.
      
      The real changes will come in subsequent patches.
      
      Note: I cannot use ->xpo_release_rqst for this purpose because that
      is called _before_ ->xpo_sendto. svc_rdma_sendto uses information in
      the received Call transport header to construct the Reply transport
      header, which is preserved in the RPC's Receive buffer.
      
      The historical comment in svc_send() isn't helpful: it is already
      obvious that ->xpo_release_rqst is being called before ->xpo_sendto,
      but there is no explanation for this ordering going back to the
      beginning of the git era.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      3a88092e
    • Chuck Lever's avatar
      svcrdma: Simplify svc_rdma_recv_ctxt_put · 1e5f4160
      Chuck Lever authored
      Currently svc_rdma_recv_ctxt_put's callers have to know whether they
      want to free the ctxt's pages or not. This means the human
      developers have to know when and why to set that free_pages
      argument.
      
      Instead, the ctxt should carry that information with it so that
      svc_rdma_recv_ctxt_put does the right thing no matter who is
      calling.
      
      We want to keep track of the number of pages in the Receive buffer
      separately from the number of pages pulled over by RDMA Read. This
      is so that the correct number of pages can be freed properly and
      that number is well-documented.
      
      So now, rc_hdr_count is the number of pages consumed by head[0]
      (ie., the page index where the Read chunk should start); and
      rc_page_count is always the number of pages that need to be released
      when the ctxt is put.
      
      The @free_pages argument is no longer needed.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      1e5f4160
    • Chuck Lever's avatar
      svcrdma: Remove sc_rq_depth · 2c577bfe
      Chuck Lever authored
      Clean up: No need to retain rq_depth in struct svcrdma_xprt, it is
      used only in svc_rdma_accept().
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      2c577bfe
    • Chuck Lever's avatar
      svcrdma: Introduce svc_rdma_recv_ctxt · ecf85b23
      Chuck Lever authored
      svc_rdma_op_ctxt's are pre-allocated and maintained on a per-xprt
      free list. This eliminates the overhead of calling kmalloc / kfree,
      both of which grab a globally shared lock that disables interrupts.
      To reduce contention further, separate the use of these objects in
      the Receive and Send paths in svcrdma.
      
      Subsequent patches will take advantage of this separation by
      allocating real resources which are then cached in these objects.
      The allocations are freed when the transport is torn down.
      
      I've renamed the structure so that static type checking can be used
      to ensure that uses of op_ctxt and recv_ctxt are not confused. As an
      additional clean up, structure fields are renamed to conform with
      kernel coding conventions.
      
      As a final clean up, helpers related to recv_ctxt are moved closer
      to the functions that use them.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      ecf85b23
    • Chuck Lever's avatar
      svcrdma: Trace key RDMA API events · bd2abef3
      Chuck Lever authored
      This includes:
        * Posting on the Send and Receive queues
        * Send, Receive, Read, and Write completion
        * Connect upcalls
        * QP errors
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      bd2abef3
    • Chuck Lever's avatar
      svcrdma: Trace key RPC/RDMA protocol events · 98895edb
      Chuck Lever authored
      This includes:
        * Transport accept and tear-down
        * Decisions about using Write and Reply chunks
        * Each RDMA segment that is handled
        * Whenever an RDMA_ERR is sent
      
      As a clean-up, I've standardized the order of the includes, and
      removed some now redundant dprintk call sites.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      98895edb
    • Chuck Lever's avatar
      xprtrdma: Prepare RPC/RDMA includes for server-side trace points · b6e717cb
      Chuck Lever authored
      Clean up: Move #include <trace/events/rpcrdma.h> into source files,
      similar to how it is done with trace/events/sunrpc.h.
      
      Server-side trace points will be part of the rpcrdma subsystem,
      just like the client-side trace points.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      b6e717cb
    • Chuck Lever's avatar
      svcrdma: Use passed-in net namespace when creating RDMA listener · 8dafcbee
      Chuck Lever authored
      Ensure each RDMA listener and its children transports are created in
      the same net namespace as the user that started the NFS service.
      This is similar to how listener sockets are created in
      svc_create_socket, required for enabling support for containers.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      8dafcbee
    • Chuck Lever's avatar
    • Trond Myklebust's avatar
      nfsd: Do not refuse to serve out of cache · 7e5d0e0d
      Trond Myklebust authored
      Currently the knfsd replay cache appears to try to refuse replying to
      retries that come within 200ms of the cache entry being created. That
      makes limited sense in today's world of high speed TCP.
      
      After a TCP disconnection, a client can very easily reconnect and retry
      an rpc in less than 200ms.  If this logic drops that retry, however, the
      client may be quite slow to retry again.  This logic is original to the
      first reply cache implementation in 2.1, and may have made more sense
      for UDP clients that retried much more frequently.
      
      After this patch we will still drop on finding the original request
      still in progress.  We may want to fix that as well at some point,
      though it's less likely.
      
      Note that svc_check_conn_limits is often the cause of those
      disconnections.  We may want to fix that some day.
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      Acked-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      7e5d0e0d
    • Scott Mayhew's avatar
      nfsd: make nfsd4_scsi_identify_device retry with a larger buffer · dac27072
      Scott Mayhew authored
      nfsd4_scsi_identify_device() performs a single IDENTIFY command for the
      device identification VPD page using a small buffer.  If the reply is
      too large to fit in this buffer then the GETDEVICEINFO reply will not
      contain any info for the SCSI volume aside from the registration key.
      This can happen for example if the device has descriptors using long
      SCSI name strings.
      
      When the initial reply from the device indicates a larger buffer is
      needed, retry once using the page length from that reply.
      Signed-off-by: default avatarScott Mayhew <smayhew@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      dac27072
  2. 07 May, 2018 2 commits
  3. 06 May, 2018 7 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 701e39d0
      Linus Torvalds authored
      Pll KVM fixes from Radim Krčmář:
       "ARM:
         - Fix proxying of GICv2 CPU interface accesses
         - Fix crash when switching to BE
         - Track source vcpu git GICv2 SGIs
         - Fix an outdated bit of documentation
      
        x86:
         - Speed up injection of expired timers (for stable)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: remove APIC Timer periodic/oneshot spikes
        arm64: vgic-v2: Fix proxying of cpuif access
        KVM: arm/arm64: vgic_init: Cleanup reference to process_maintenance
        KVM: arm64: Fix order of vcpu_write_sys_reg() arguments
        KVM: arm/arm64: vgic: Fix source vcpu issues for GICv2 SGI
      701e39d0
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 772d4f84
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - fix a compile warning in the AMD IOMMU driver with irq remapping
         disabled
      
       - fix for VT-d interrupt remapping and invalidation size (caused a
         BUG_ON when trying to invalidate more than 4GB)
      
       - build fix and a regression fix for broken graphics with old DTS for
         the rockchip iommu driver
      
       - a revert in the PCI window reservation code which fixes a regression
         with VFIO.
      
      * tag 'iommu-fixes-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu: rockchip: fix building without CONFIG_OF
        iommu/vt-d: Use WARN_ON_ONCE instead of BUG_ON in qi_flush_dev_iotlb()
        iommu/vt-d: fix shift-out-of-bounds in bug checking
        iommu/dma: Move PCI window region reservation back into dma specific path.
        iommu/rockchip: Make clock handling optional
        iommu/amd: Hide unused iommu_table_lock
        iommu/vt-d: Fix usage of force parameter in intel_ir_reconfigure_irte()
      772d4f84
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9c48eb6a
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "Unbreak the CPUID CPUID_8000_0008_EBX reload which got dropped when
        the evaluation of physical and virtual bits which uses the same CPUID
        leaf was moved out of get_cpu_cap()"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Restore CPUID_8000_0008_EBX reload
      9c48eb6a
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fe282c60
      Linus Torvalds authored
      Pull clocksource fixes from Thomas Gleixner:
       "The recent addition of the early TSC clocksource breaks on machines
        which have an unstable TSC because in case that TSC is disabled, then
        the clocksource selection logic falls back to the early TSC which is
        obviously bogus.
      
        That also unearthed a few robustness issues in the clocksource
        derating code which are addressed as well"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource: Rework stale comment
        clocksource: Consistent de-rate when marking unstable
        x86/tsc: Fix mark_tsc_unstable()
        clocksource: Initialize cs->wd_list
        clocksource: Allow clocksource_mark_unstable() on unregistered clocksources
        x86/tsc: Always unregister clocksource_tsc_early
      fe282c60
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 03b5f0c1
      Linus Torvalds authored
      Pull irq fix from Thomas Gleixner:
       "A single fix to prevent false positives in the spurious interrupt
        detector when more than a single demultiplex register is evaluated in
        the Qualcom irq combiner driver"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/qcom: Fix check for spurious interrupts
      03b5f0c1
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.17-2' of git://git.infradead.org/linux-platform-drivers-x86 · ee946c36
      Linus Torvalds authored
      Pull x86 platform driver fixes from Darren Hart:
      
       - We missed a case in the Dell config dependencies resulting in a
         possible bad configuration, resolve it by giving up on trying to keep
         DELL_LAPTOP visible in the menu and make it depend on DELL_SMBIOS.
      
       - Fix a null pointer dereference at module unload for the asus-wireless
         driver.
      
      * tag 'platform-drivers-x86-v4.17-2' of git://git.infradead.org/linux-platform-drivers-x86:
        platform/x86: Kconfig: Fix dell-laptop dependency chain.
        platform/x86: asus-wireless: Fix NULL pointer dereference
      ee946c36
    • Linus Torvalds's avatar
      Merge tag 'usb-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 8e95cb33
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some USB driver fixes for 4.17-rc4.
      
        The majority of them are some USB gadget fixes that missed my last
        pull request. The "largest" patch in here is a fix for the old visor
        driver that syzbot found 6 months or so ago and I finally remembered
        to fix it.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        Revert "usb: host: ehci: Use dma_pool_zalloc()"
        usb: typec: tps6598x: handle block reads separately with plain-I2C adapters
        usb: typec: tcpm: Release the role mux when exiting
        USB: Accept bulk endpoints with 1024-byte maxpacket
        xhci: Fix use-after-free in xhci_free_virt_device
        USB: serial: visor: handle potential invalid device configuration
        USB: serial: option: adding support for ublox R410M
        usb: musb: trace: fix NULL pointer dereference in musb_g_tx()
        usb: musb: host: fix potential NULL pointer dereference
        usb: gadget: composite Allow for larger configuration descriptors
        usb: dwc3: gadget: Fix list_del corruption in dwc3_ep_dequeue
        usb: dwc3: gadget: dwc3_gadget_del_and_unmap_request() can be static
        usb: dwc2: pci: Fix error return code in dwc2_pci_probe()
        usb: dwc2: WA for Full speed ISOC IN in DDMA mode.
        usb: dwc2: dwc2_vbus_supply_init: fix error check
        usb: gadget: f_phonet: fix pn_net_xmit()'s return type
      8e95cb33
  4. 05 May, 2018 15 commits
    • Anthoine Bourgeois's avatar
      KVM: x86: remove APIC Timer periodic/oneshot spikes · ecf08dad
      Anthoine Bourgeois authored
      Since the commit "8003c9ae: add APIC Timer periodic/oneshot mode VMX
      preemption timer support", a Windows 10 guest has some erratic timer
      spikes.
      
      Here the results on a 150000 times 1ms timer without any load:
      	  Before 8003c9ae | After 8003c9ae
      Max           1834us          |  86000us
      Mean          1100us          |   1021us
      Deviation       59us          |    149us
      Here the results on a 150000 times 1ms timer with a cpu-z stress test:
      	  Before 8003c9ae | After 8003c9ae
      Max          32000us          | 140000us
      Mean          1006us          |   1997us
      Deviation      140us          |  11095us
      
      The root cause of the problem is starting hrtimer with an expiry time
      already in the past can take more than 20 milliseconds to trigger the
      timer function.  It can be solved by forward such past timers
      immediately, rather than submitting them to hrtimer_start().
      In case the timer is periodic, update the target expiration and call
      hrtimer_start with it.
      
      v2: Check if the tsc deadline is already expired. Thank you Mika.
      v3: Execute the past timers immediately rather than submitting them to
      hrtimer_start().
      v4: Rearm the periodic timer with advance_periodic_target_expiration() a
      simpler version of set_target_expiration(). Thank you Paolo.
      
      Cc: Mika Penttilä <mika.penttila@nextfour.com>
      Cc: Wanpeng Li <kernellwp@gmail.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAnthoine Bourgeois <anthoine.bourgeois@blade-group.com>
      8003c9ae ("KVM: LAPIC: add APIC Timer periodic/oneshot mode VMX preemption timer support")
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      ecf08dad
    • Radim Krčmář's avatar
      Merge tag 'kvmarm-fixes-for-4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm · f3351c60
      Radim Krčmář authored
      KVM/arm fixes for 4.17, take #2
      
      - Fix proxying of GICv2 CPU interface accesses
      - Fix crash when switching to BE
      - Track source vcpu git GICv2 SGIs
      - Fix an outdated bit of documentation
      f3351c60
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v4.17' of... · c1c07416
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - remove state comment in modpost
      
       - extend MAINTAINERS entry to cover modpost and more makefiles
      
       - fix missed building of SANCOV gcc-plugin
      
       - replace left-over 'bison' with $(YACC)
      
       - display short log when generating parer of genksyms
      
      * tag 'kbuild-fixes-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        genksyms: fix typo in parse.tab.{c,h} generation rules
        kbuild: replace hardcoded bison in cmd_bison_h with $(YACC)
        gcc-plugins: fix build condition of SANCOV plugin
        MAINTAINERS: Update Kbuild entry with a few paths
        modpost: delete stale comment
      c1c07416
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 4a7a7729
      Linus Torvalds authored
      Pull clk fixes froom Stephen Boyd:
       "A handful of fixes for the stm32mp1 clk driver came in during the
        merge window for the driver that got merged in the merge window.
      
        Plus a warning fix for unused PM ops and a couple fixes for the meson
        clk driver clk names that went unnoticed with the regmap rework.
      
        There's also another fix in here for the mux rounding flag which
        wasn't doing what it said it did, but now it does"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: meson: meson8b: fix meson8b_cpu_clk parent clock name
        clk: meson: meson8b: fix meson8b_fclk_div3_div clock name
        clk: meson: drop meson_aoclk_gate_regmap_ops
        clk: meson: honor CLK_MUX_ROUND_CLOSEST in clk_regmap
        clk: honor CLK_MUX_ROUND_CLOSEST in generic clk mux
        clk: cs2000: mark resume function as __maybe_unused
        clk: stm32mp1: remove ck_apb_dbg clock
        clk: stm32mp1: set stgen_k clock as critical
        clk: stm32mp1: add missing tzc2 clock
        clk: stm32mp1: fix SAI3 & SAI4 clocks
        clk: stm32mp1: remove unused dfsdm_src[] const
        clk: stm32mp1: add missing static
      4a7a7729
    • Linus Torvalds's avatar
      Merge tag 'rproc-v4.17-1' of git://github.com/andersson/remoteproc · f9331473
      Linus Torvalds authored
      Pull remoteproc and rpmsg fixes from Bjorn Andersson:
      
       - fix screw-up when reversing boolean for rproc_stop()
      
       - add missing OF node refcounting dereferences
      
       - add missing MODULE_ALIAS in rpmsg_char
      
      * tag 'rproc-v4.17-1' of git://github.com/andersson/remoteproc:
        rpmsg: added MODULE_ALIAS for rpmsg_char
        remoteproc: qcom: Fix potential device node leaks
        remoteproc: fix crashed parameter logic on stop call
      f9331473
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.17-rc4' of git://people.freedesktop.org/~airlied/linux · c12fd0fe
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "vmwgfx, i915, vc4, vga dac fixes.
      
        This seems eerily quiet, so I expect it will explode next week or
        something.
      
        One i915 model firmware, two vmwgfx fixes, one vc4 fix and one bridge
        leak fix"
      
      * tag 'drm-fixes-for-v4.17-rc4' of git://people.freedesktop.org/~airlied/linux:
        drm/bridge: vga-dac: Fix edid memory leak
        drm/vc4: Make sure vc4_bo_{inc,dec}_usecnt() calls are balanced
        drm/i915/glk: Add MODULE_FIRMWARE for Geminilake
        drm/vmwgfx: Fix a buffer object leak
        drm/vmwgfx: Clean up fbdev modeset locking
      c12fd0fe
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.17-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 4b293907
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "Some of the files in the tracing directory show file mode 0444 when
        they are writable by root. To fix the confusion, they should be 0644.
        Note, either case root can still write to them.
      
        Zhengyuan asked why I never applied that patch (the first one is from
        2014!). I simply forgot about it. /me lowers head in shame"
      
      * tag 'trace-v4.17-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix the file mode of stack tracer
        ftrace: Have set_graph_* files have normal file modes
      4b293907
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · eb4f959b
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "This is our first pull request of the rc cycle. It's not that it's
        been overly quiet, we were just waiting on a few things before sending
        this off.
      
        For instance, the 6 patch series from Intel for the hfi1 driver had
        actually been pulled in on Tuesday for a Wednesday pull request, only
        to have Jason notice something I missed, so we held off for some
        testing, and then on Thursday had to respin the series because the
        very first patch needed a minor fix (unnecessary cast is all).
      
        There is a sizable hns patch series in here, as well as a reasonably
        largish hfi1 patch series, then all of the lines of uapi updates are
        just the change to the new official Linux-OpenIB SPDX tag (a bunch of
        our files had what amounts to a BSD-2-Clause + MIT Warranty statement
        as their license as a result of the initial code submission years ago,
        and the SPDX folks decided it was unique enough to warrant a unique
        tag), then the typical mlx4 and mlx5 updates, and finally some cxgb4
        and core/cache/cma updates to round out the bunch.
      
        None of it was overly large by itself, but in the 2 1/2 weeks we've
        been collecting patches, it has added up :-/.
      
        As best I can tell, it's been through 0day (I got a notice about my
        last for-next push, but not for my for-rc push, but Jason seems to
        think that failure messages are prioritized and success messages not
        so much). It's also been through linux-next. And yes, we did notice in
        the context portion of the CMA query gid fix patch that there is a
        dubious BUG_ON() in the code, and have plans to audit our BUG_ON usage
        and remove it anywhere we can.
      
        Summary:
      
         - Various build fixes (USER_ACCESS=m and ADDR_TRANS turned off)
      
         - SPDX license tag cleanups (new tag Linux-OpenIB)
      
         - RoCE GID fixes related to default GIDs
      
         - Various fixes to: cxgb4, uverbs, cma, iwpm, rxe, hns (big batch),
           mlx4, mlx5, and hfi1 (medium batch)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (52 commits)
        RDMA/cma: Do not query GID during QP state transition to RTR
        IB/mlx4: Fix integer overflow when calculating optimal MTT size
        IB/hfi1: Fix memory leak in exception path in get_irq_affinity()
        IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure
        IB/hfi1: Fix NULL pointer dereference when invalid num_vls is used
        IB/hfi1: Fix loss of BECN with AHG
        IB/hfi1 Use correct type for num_user_context
        IB/hfi1: Fix handling of FECN marked multicast packet
        IB/core: Make ib_mad_client_id atomic
        iw_cxgb4: Atomically flush per QP HW CQEs
        IB/uverbs: Fix kernel crash during MR deregistration flow
        IB/uverbs: Prevent reregistration of DM_MR to regular MR
        RDMA/mlx4: Add missed RSS hash inner header flag
        RDMA/hns: Fix a couple misspellings
        RDMA/hns: Submit bad wr
        RDMA/hns: Update assignment method for owner field of send wqe
        RDMA/hns: Adjust the order of cleanup hem table
        RDMA/hns: Only assign dqpn if IB_QP_PATH_DEST_QPN bit is set
        RDMA/hns: Remove some unnecessary attr_mask judgement
        RDMA/hns: Only assign mtu if IB_QP_PATH_MTU bit is set
        ...
      eb4f959b
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20180504' of git://git.kernel.dk/linux-block · 2f50037a
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A collection of fixes that should to into this release. This contains:
      
         - Set of bcache fixes from Coly, fixing regression in patches that
           went into this series.
      
         - Set of NVMe fixes by way of Keith.
      
         - Set of bdi related fixes, one from Jan and two from Tetsuo Handa,
           fixing various issues around device addition/removal.
      
         - Two block inflight fixes from Omar, fixing issues around the
           transition to using tags for blk-mq inflight accounting that we
           did a few releases ago"
      
      * tag 'for-linus-20180504' of git://git.kernel.dk/linux-block:
        bdi: Fix oops in wb_workfn()
        nvmet: switch loopback target state to connecting when resetting
        nvme/multipath: Fix multipath disabled naming collisions
        nvme/multipath: Disable runtime writable enabling parameter
        nvme: Set integrity flag for user passthrough commands
        nvme: fix potential memory leak in option parsing
        bdi: Fix use after free bug in debugfs_remove()
        bdi: wake up concurrent wb_shutdown() callers.
        bcache: use pr_info() to inform duplicated CACHE_SET_IO_DISABLE set
        bcache: set dc->io_disable to true in conditional_stop_bcache_device()
        bcache: add wait_for_kthread_stop() in bch_allocator_thread()
        bcache: count backing device I/O error for writeback I/O
        bcache: set CACHE_SET_IO_DISABLE in bch_cached_dev_error()
        bcache: store disk name in struct cache and struct cached_dev
        blk-mq: fix sysfs inflight counter
        blk-mq: count allocated but not started requests in iostats inflight
      2f50037a
    • Linus Torvalds's avatar
      Merge tag 'xfs-4.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 2e171ffc
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
       "I've got one more bug fix for xfs for 4.17-rc4, which caps the amount
        of data we try to handle in one dedupe request so that userspace can't
        livelock the kernel.
      
        This series has been run through a full xfstests run during the week
        and through a quick xfstests run against this morning's master, with
        no ajor failures reported.
      
        Summary:
      
        - Cap the maximum length of a deduplication request at MAX_RW_COUNT/2
          to avoid kernel livelock due to excessively large IO requests"
      
      * tag 'xfs-4.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: cap the length of deduplication requests
      2e171ffc
    • Linus Torvalds's avatar
      Merge tag 'for-4.17-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 4148d388
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "Two regression fixes and one fix for stable"
      
      * tag 'for-4.17-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Btrfs: send, fix missing truncate for inode with prealloc extent past eof
        btrfs: Take trans lock before access running trans in check_delayed_ref
        btrfs: Fix wrong first_key parameter in replace_path
      4148d388
    • Mauro Rossi's avatar
      genksyms: fix typo in parse.tab.{c,h} generation rules · 0da7e432
      Mauro Rossi authored
      'quet' is replaced by 'quiet' in scripts/genksyms/Makefile
      Signed-off-by: default avatarMauro Rossi <issor.oruam@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      0da7e432
    • Masahiro Yamada's avatar
      kbuild: replace hardcoded bison in cmd_bison_h with $(YACC) · d59fbbd0
      Masahiro Yamada authored
      Commit 73a4f6db ("kbuild: add LEX and YACC variables") missed to
      update cmd_bison_h somehow.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      d59fbbd0
    • Masahiro Yamada's avatar
      gcc-plugins: fix build condition of SANCOV plugin · 642ef99b
      Masahiro Yamada authored
      Since commit d677a4d6 ("Makefile: support flag
      -fsanitizer-coverage=trace-cmp"), you miss to build the SANCOV
      plugin under some circumstances.
      
        CONFIG_KCOV=y
        CONFIG_KCOV_ENABLE_COMPARISONS=y
        Your compiler does not support -fsanitize-coverage=trace-pc
        Your compiler does not support -fsanitize-coverage=trace-cmp
      
      Under this condition, $(CFLAGS_KCOV) is not empty but contains a
      space, so the following ifeq-conditional is false.
      
          ifeq ($(CFLAGS_KCOV),)
      
      Then, scripts/Makefile.gcc-plugins misses to add sancov_plugin.so to
      gcc-plugin-y while the SANCOV plugin is necessary as an alternative
      means.
      
      Fixes: d677a4d6 ("Makefile: support flag -fsanitizer-coverage=trace-cmp")
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      642ef99b
    • Rasmus Villemoes's avatar
      MAINTAINERS: Update Kbuild entry with a few paths · 1cd4023b
      Rasmus Villemoes authored
      I managed to send some modpost patches to old addresses of both
      Masahiro and Michal, and omitted linux-kbuild from cc, because my
      tried and trusted scripts/get_maintainer wrapper failed me. Add the
      modpost directory to the MAINTAINERS entry, and while at it make the
      Makefile glob match scripts/Makefile itself, and add one matching the
      Kbuild.include file as well.
      Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      1cd4023b
  5. 04 May, 2018 4 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-serial-4.17-rc4' of... · 6844dc42
      Greg Kroah-Hartman authored
      Merge tag 'usb-serial-4.17-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
      
      Johan writes:
      
      USB-serial fixes for v4.17-rc4
      
      Here's a fix for a long-standing issue in the visor driver, which could
      have security implications. Included is also a new modem device id.
      
      Both commits have been in linux-next for a couple of days with no
      reported issues.
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      6844dc42
    • Greg Kroah-Hartman's avatar
      Revert "usb: host: ehci: Use dma_pool_zalloc()" · 43b78f11
      Greg Kroah-Hartman authored
      This reverts commit 22072e83 as it is
      broken.
      
      Alan writes:
      	What you can't see just from reading the patch is that in both
      	cases (ehci->itd_pool and ehci->sitd_pool) there are two
      	allocation paths -- the two branches of an "if" statement -- and
      	only one of the paths calls dma_pool_[z]alloc.  However, the
      	memset is needed for both paths, and so it can't be eliminated.
      	Given that it must be present, there's no advantage to calling
      	dma_pool_zalloc rather than dma_pool_alloc.
      Reported-by: default avatarErick Cafferata <erick@cafferata.me>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Souptick Joarder <jrdr.linux@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      43b78f11
    • Mario Limonciello's avatar
      platform/x86: Kconfig: Fix dell-laptop dependency chain. · 7fe3fa3b
      Mario Limonciello authored
      As reported by Randy Dunlap:
      >> WARNING: unmet direct dependencies detected for DELL_SMBIOS
      >>   Depends on [m]: X86 [=y] && X86_PLATFORM_DEVICES [=y]
      >>	&& (DCDBAS [=m] ||
      >> DCDBAS [=m]=n) && (ACPI_WMI [=n] || ACPI_WMI [=n]=n)
      >>   Selected by [y]:
      >>   - DELL_LAPTOP [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y]
      >> && DMI [=y]
      >> && BACKLIGHT_CLASS_DEVICE [=y] && (ACPI_VIDEO [=n] ||
      >>	ACPI_VIDEO [=n]=n)
      >> && (RFKILL [=n] || RFKILL [=n]=n) && SERIO_I8042 [=y]
      >>
      
      Right now it's possible to set dell laptop to compile in but this
      causes dell-smbios to compile in which breaks if dcdbas is a module.
      
      Dell laptop shouldn't select dell-smbios anymore, but depend on it.
      
      Fixes: 32d7b19b (platform/x86: dell-smbios: Resolve dependency error on DCDBAS)
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@dell.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      7fe3fa3b
    • João Paulo Rechi Vita's avatar
      platform/x86: asus-wireless: Fix NULL pointer dereference · 9f0a93de
      João Paulo Rechi Vita authored
      When the module is removed the led workqueue is destroyed in the remove
      callback, before the led device is unregistered from the led subsystem.
      
      This leads to a NULL pointer derefence when the led device is
      unregistered automatically later as part of the module removal cleanup.
      Bellow is the backtrace showing the problem.
      
        BUG: unable to handle kernel NULL pointer dereference at           (null)
        IP: __queue_work+0x8c/0x410
        PGD 0 P4D 0
        Oops: 0000 [#1] SMP NOPTI
        Modules linked in: ccm edac_mce_amd kvm_amd kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 joydev crypto_simd asus_nb_wmi glue_helper uvcvideo snd_hda_codec_conexant snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel asus_wmi snd_hda_codec cryptd snd_hda_core sparse_keymap videobuf2_vmalloc arc4 videobuf2_memops snd_hwdep input_leds videobuf2_v4l2 ath9k psmouse videobuf2_core videodev ath9k_common snd_pcm ath9k_hw media fam15h_power ath k10temp snd_timer mac80211 i2c_piix4 r8169 mii mac_hid cfg80211 asus_wireless(-) snd soundcore wmi shpchp 8250_dw ip_tables x_tables amdkfd amd_iommu_v2 amdgpu radeon chash i2c_algo_bit drm_kms_helper syscopyarea serio_raw sysfillrect sysimgblt fb_sys_fops ahci ttm libahci drm video
        CPU: 3 PID: 2177 Comm: rmmod Not tainted 4.15.0-5-generic #6+dev94.b4287e5bem1-Endless
        Hardware name: ASUSTeK COMPUTER INC. X555DG/X555DG, BIOS 5.011 05/05/2015
        RIP: 0010:__queue_work+0x8c/0x410
        RSP: 0018:ffffbe8cc249fcd8 EFLAGS: 00010086
        RAX: ffff992ac6810800 RBX: 0000000000000000 RCX: 0000000000000008
        RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff992ac6400e18
        RBP: ffffbe8cc249fd18 R08: ffff992ac6400db0 R09: 0000000000000000
        R10: 0000000000000040 R11: ffff992ac6400dd8 R12: 0000000000002000
        R13: ffff992abd762e00 R14: ffff992abd763e38 R15: 000000000001ebe0
        FS:  00007f318203e700(0000) GS:ffff992aced80000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000000000000000 CR3: 00000001c720e000 CR4: 00000000001406e0
        Call Trace:
         queue_work_on+0x38/0x40
         led_state_set+0x2c/0x40 [asus_wireless]
         led_set_brightness_nopm+0x14/0x40
         led_set_brightness+0x37/0x60
         led_trigger_set+0xfc/0x1d0
         led_classdev_unregister+0x32/0xd0
         devm_led_classdev_release+0x11/0x20
         release_nodes+0x109/0x1f0
         devres_release_all+0x3c/0x50
         device_release_driver_internal+0x16d/0x220
         driver_detach+0x3f/0x80
         bus_remove_driver+0x55/0xd0
         driver_unregister+0x2c/0x40
         acpi_bus_unregister_driver+0x15/0x20
         asus_wireless_driver_exit+0x10/0xb7c [asus_wireless]
         SyS_delete_module+0x1da/0x2b0
         entry_SYSCALL_64_fastpath+0x24/0x87
        RIP: 0033:0x7f3181b65fd7
        RSP: 002b:00007ffe74bcbe18 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
        RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3181b65fd7
        RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000555ea2559258
        RBP: 0000555ea25591f0 R08: 00007ffe74bcad91 R09: 000000000000000a
        R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000003
        R13: 00007ffe74bcae00 R14: 0000000000000000 R15: 0000555ea25591f0
        Code: 01 00 00 02 0f 85 7d 01 00 00 48 63 45 d4 48 c7 c6 00 f4 fa 87 49 8b 9d 08 01 00 00 48 03 1c c6 4c 89 f7 e8 87 fb ff ff 48 85 c0 <48> 8b 3b 0f 84 c5 01 00 00 48 39 f8 0f 84 bc 01 00 00 48 89 c7
        RIP: __queue_work+0x8c/0x410 RSP: ffffbe8cc249fcd8
        CR2: 0000000000000000
        ---[ end trace 7aa4f4a232e9c39c ]---
      
      Unregistering the led device on the remove callback before destroying the
      workqueue avoids this problem.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=196097Reported-by: default avatarDun Hum <bitter.taste@gmx.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJoão Paulo Rechi Vita <jprvita@endlessm.com>
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      9f0a93de