1. 14 4月, 2019 8 次提交
    • J
      io_uring: only test SQPOLL cpu after we've verified it · 917257da
      Jens Axboe 提交于
      We currently call cpu_possible() even if we don't use the CPU. Move the
      test under the SQ_AFF branch, which is the only place where we'll use
      the value. Do the cpu_possible() test AFTER we've limited it to a max
      of NR_CPUS. This avoids triggering the following warning:
      
      WARNING: CPU: 1 PID: 7600 at include/linux/cpumask.h:121 cpu_max_bits_warn
      
      if CONFIG_DEBUG_PER_CPU_MAPS is enabled.
      
      While in there, also move the SQ thread idle period assignment inside
      SETUP_SQPOLL, as we don't use it otherwise either.
      
      Reported-by: syzbot+cd714a07c6de2bc34293@syzkaller.appspotmail.com
      Fixes: 6c271ce2 ("io_uring: add submission polling")
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      917257da
    • J
      io_uring: park SQPOLL thread if it's percpu · 06058632
      Jens Axboe 提交于
      kthread expects this, or we can throw a warning on exit:
      
      WARNING: CPU: 0 PID: 7822 at kernel/kthread.c:399
      __kthread_bind_mask+0x3b/0xc0 kernel/kthread.c:399
      Kernel panic - not syncing: panic_on_warn set ...
      CPU: 0 PID: 7822 Comm: syz-executor030 Not tainted 5.1.0-rc4-next-20190412
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
      Google 01/01/2011
      Call Trace:
        __dump_stack lib/dump_stack.c:77 [inline]
        dump_stack+0x172/0x1f0 lib/dump_stack.c:113
        panic+0x2cb/0x72b kernel/panic.c:214
        __warn.cold+0x20/0x46 kernel/panic.c:576
        report_bug+0x263/0x2b0 lib/bug.c:186
        fixup_bug arch/x86/kernel/traps.c:179 [inline]
        fixup_bug arch/x86/kernel/traps.c:174 [inline]
        do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272
        do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:291
        invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:973
      RIP: 0010:__kthread_bind_mask+0x3b/0xc0 kernel/kthread.c:399
      Code: 48 89 fb e8 f7 ab 24 00 4c 89 e6 48 89 df e8 ac e1 02 00 31 ff 49 89
      c4 48 89 c6 e8 7f ad 24 00 4d 85 e4 75 15 e8 d5 ab 24 00 <0f> 0b e8 ce ab
      24 00 5b 41 5c 41 5d 41 5e 5d c3 e8 c0 ab 24 00 4c
      RSP: 0018:ffff8880a89bfbb8 EFLAGS: 00010293
      RAX: ffff88808ca7a280 RBX: ffff8880a98e4380 RCX: ffffffff814bdd11
      RDX: 0000000000000000 RSI: ffffffff814bdd1b RDI: 0000000000000007
      RBP: ffff8880a89bfbd8 R08: ffff88808ca7a280 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
      R13: ffffffff87691148 R14: ffff8880a98e43a0 R15: ffffffff81c91e10
        __kthread_bind kernel/kthread.c:412 [inline]
        kthread_unpark+0x123/0x160 kernel/kthread.c:480
        kthread_stop+0xfa/0x6c0 kernel/kthread.c:556
        io_sq_thread_stop fs/io_uring.c:2057 [inline]
        io_sq_thread_stop fs/io_uring.c:2052 [inline]
        io_finish_async+0xab/0x180 fs/io_uring.c:2064
        io_ring_ctx_free fs/io_uring.c:2534 [inline]
        io_ring_ctx_wait_and_kill+0x133/0x510 fs/io_uring.c:2591
        io_uring_release+0x42/0x50 fs/io_uring.c:2599
        __fput+0x2e5/0x8d0 fs/file_table.c:278
        ____fput+0x16/0x20 fs/file_table.c:309
        task_work_run+0x14a/0x1c0 kernel/task_work.c:113
        exit_task_work include/linux/task_work.h:22 [inline]
        do_exit+0x90a/0x2fa0 kernel/exit.c:876
        do_group_exit+0x135/0x370 kernel/exit.c:980
        __do_sys_exit_group kernel/exit.c:991 [inline]
        __se_sys_exit_group kernel/exit.c:989 [inline]
        __x64_sys_exit_group+0x44/0x50 kernel/exit.c:989
        do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
        entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Reported-by: syzbot+6d4a92619eb0ad08602b@syzkaller.appspotmail.com
      Fixes: 6c271ce2 ("io_uring: add submission polling")
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      06058632
    • L
      Merge tag 'for-linus-20190412' of git://git.kernel.dk/linux-block · 4443f8e6
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
       "Set of fixes that should go into this round. This pull is larger than
        I'd like at this time, but there's really no specific reason for that.
        Some are fixes for issues that went into this merge window, others are
        not. Anyway, this contains:
      
         - Hardware queue limiting for virtio-blk/scsi (Dongli)
      
         - Multi-page bvec fixes for lightnvm pblk
      
         - Multi-bio dio error fix (Jason)
      
         - Remove the cache hint from the io_uring tool side, since we didn't
           move forward with that (me)
      
         - Make io_uring SETUP_SQPOLL root restricted (me)
      
         - Fix leak of page in error handling for pc requests (Jérôme)
      
         - Fix BFQ regression introduced in this merge window (Paolo)
      
         - Fix break logic for bio segment iteration (Ming)
      
         - Fix NVMe cancel request error handling (Ming)
      
         - NVMe pull request with two fixes (Christoph):
             - fix the initial CSN for nvme-fc (James)
             - handle log page offsets properly in the target (Keith)"
      
      * tag 'for-linus-20190412' of git://git.kernel.dk/linux-block:
        block: fix the return errno for direct IO
        nvmet: fix discover log page when offsets are used
        nvme-fc: correct csn initialization and increments on error
        block: do not leak memory in bio_copy_user_iov()
        lightnvm: pblk: fix crash in pblk_end_partial_read due to multipage bvecs
        nvme: cancel request synchronously
        blk-mq: introduce blk_mq_complete_request_sync()
        scsi: virtio_scsi: limit number of hw queues by nr_cpu_ids
        virtio-blk: limit number of hw queues by nr_cpu_ids
        block, bfq: fix use after free in bfq_bfqq_expire
        io_uring: restrict IORING_SETUP_SQPOLL to root
        tools/io_uring: remove IOCQE_FLAG_CACHEHIT
        block: don't use for-inside-for in bio_for_each_segment_all
      4443f8e6
    • L
      Merge tag 'nfs-for-5.1-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · b60bc066
      Linus Torvalds 提交于
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Stable fix:
      
         - Fix a deadlock in close() due to incorrect draining of RDMA queues
      
        Bugfixes:
      
         - Revert "SUNRPC: Micro-optimise when the task is known not to be
           sleeping" as it is causing stack overflows
      
         - Fix a regression where NFSv4 getacl and fs_locations stopped
           working
      
         - Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
      
         - Fix xfstests failures due to incorrect copy_file_range() return
           values"
      
      * tag 'nfs-for-5.1-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        Revert "SUNRPC: Micro-optimise when the task is known not to be sleeping"
        NFSv4.1 fix incorrect return value in copy_file_range
        xprtrdma: Fix helper that drains the transport
        NFS: Fix handling of reply page vector
        NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
      b60bc066
    • L
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 87af0c38
      Linus Torvalds 提交于
      Pull SCSI fix from James Bottomley:
       "One obvious fix for a ciostor data corruption on error bug"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: csiostor: fix missing data copy in csio_scsi_err_handler()
      87af0c38
    • L
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 09bad0df
      Linus Torvalds 提交于
      Pull clk fixes from Stephen Boyd:
       "Here's more than a handful of clk driver fixes for changes that came
        in during the merge window:
      
         - Fix the AT91 sama5d2 programmable clk prescaler formula
      
         - A bunch of Amlogic meson clk driver fixes for the VPU clks
      
         - A DMI quirk for Intel's Bay Trail SoC's driver to properly mark pmc
           clks as critical only when really needed
      
         - Stop overwriting CLK_SET_RATE_PARENT flag in mediatek's clk gate
           implementation
      
         - Use the right structure to test for a frequency table in i.MX's
           PLL_1416x driver"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: imx: Fix PLL_1416X not rounding rates
        clk: mediatek: fix clk-gate flag setting
        platform/x86: pmc_atom: Drop __initconst on dmi table
        clk: x86: Add system specific quirk to mark clocks as critical
        clk: meson: vid-pll-div: remove warning and return 0 on invalid config
        clk: meson: pll: fix rounding and setting a rate that matches precisely
        clk: meson-g12a: fix VPU clock parents
        clk: meson: g12a: fix VPU clock muxes mask
        clk: meson-gxbb: round the vdec dividers to closest
        clk: at91: fix programmable clock for sama5d2
      09bad0df
    • L
      Merge tag 'pci-v5.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · a3b84248
      Linus Torvalds 提交于
      Pull PCI fixes from Bjorn Helgaas:
      
       - Add a DMA alias quirk for another Marvell SATA device (Andre
         Przywara)
      
       - Fix a pciehp regression that broke safe removal of devices (Sergey
         Miroshnichenko)
      
      * tag 'pci-v5.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: pciehp: Ignore Link State Changes after powering off a slot
        PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller
      a3b84248
    • L
      Merge tag 'powerpc-5.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · cf60528f
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
       "A minor build fix for 64-bit FLATMEM configs.
      
        A fix for a boot failure on 32-bit powermacs.
      
        My commit to fix CLOCK_MONOTONIC across Y2038 broke the 32-bit VDSO on
        64-bit kernels, ie. compat mode, which is only used on big endian.
      
        The rewrite of the SLB code we merged in 4.20 missed the fact that the
        0x380 exception is also used with the Radix MMU to report out of range
        accesses. This could lead to an oops if userspace tried to read from
        addresses outside the user or kernel range.
      
        Thanks to: Aneesh Kumar K.V, Christophe Leroy, Larry Finger, Nicholas
        Piggin"
      
      * tag 'powerpc-5.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/mm: Define MAX_PHYSMEM_BITS for all 64-bit configs
        powerpc/64s/radix: Fix radix segment exception handling
        powerpc/vdso32: fix CLOCK_MONOTONIC on PPC64
        powerpc/32: Fix early boot failure with RTAS built-in
      cf60528f
  2. 13 4月, 2019 10 次提交
  3. 12 4月, 2019 22 次提交
    • L
      Merge tag 'dma-mapping-5.1-1' of git://git.infradead.org/users/hch/dma-mapping · 8ee15f32
      Linus Torvalds 提交于
      Pull dma-mapping fixes from Christoph Hellwig:
       "Fix a sparc64 sun4v_pci regression introduced in this merged window,
        and a dma-debug stracktrace regression from the big refactor last
        merge window"
      
      * tag 'dma-mapping-5.1-1' of git://git.infradead.org/users/hch/dma-mapping:
        dma-debug: only skip one stackframe entry
        sparc64/pci_sun4v: fix ATU checks for large DMA masks
      8ee15f32
    • L
      Merge tag 'iommu-fix-v5.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 4876191c
      Linus Torvalds 提交于
      Pull IOMMU fix from Joerg Roedel:
       "Fix an AMD IOMMU issue where the driver didn't correctly setup the
        exclusion range in the hardware registers, resulting in exclusion
        ranges being one page too big.
      
        This can cause data corruption of the address of that last page is
        used by DMA operations"
      
      * tag 'iommu-fix-v5.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Set exclusion range correctly
      4876191c
    • L
      Merge tag 'clang-format-for-linus-v5.1-rc5' of git://github.com/ojeda/linux · 8e72d95d
      Linus Torvalds 提交于
      Pull clang-format update from Miguel Ojeda:
       "The usual roughly-per-release .clang-format macro list update"
      
      * tag 'clang-format-for-linus-v5.1-rc5' of git://github.com/ojeda/linux:
        clang-format: Update with the latest for_each macro list
      8e72d95d
    • L
      Merge tag 'mmc-v5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · ea951a94
      Linus Torvalds 提交于
      Pull MMC host fixes from Ulf Hansson:
      
       - alcor: Stabilize data write requests
      
       - sdhci-omap: Fix command error path during tuning
      
      * tag 'mmc-v5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci-omap: Don't finish_mrq() on a command error during tuning
        mmc: alcor: don't write data before command has completed
      ea951a94
    • L
      Merge tag 'sound-5.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 372686e6
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "Well, this one became unpleasantly larger than previous pull requests,
        but it's a kind of usual pattern: now it contains a collection of ASoC
        fixes, and nothing to worry too much.
      
        The fixes for ASoC core (DAPM, DPCM, topology) are all small and just
        covering corner cases. The rest changes are driver-specific, many of
        which are for x86 platforms and new drivers like STM32, in addition to
        the usual fixups for HD-audio"
      
      * tag 'sound-5.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (66 commits)
        ASoC: wcd9335: Fix missing regmap requirement
        ALSA: hda: Fix racy display power access
        ASoC: pcm: fix error handling when try_module_get() fails.
        ASoC: stm32: sai: fix master clock management
        ASoC: Intel: kbl: fix wrong number of channels
        ALSA: hda - Add two more machines to the power_save_blacklist
        ASoC: pcm: update module refcount if module_get_upon_open is set
        ASoC: core: conditionally increase module refcount on component open
        ASoC: stm32: fix sai driver name initialisation
        ASoC: topology: Use the correct dobj to free enum control values and texts
        ALSA: seq: Fix OOB-reads from strlcpy
        ASoC: intel: skylake: add remove() callback for component driver
        ASoC: cs35l35: Disable regulators on driver removal
        ALSA: xen-front: Do not use stream buffer size before it is set
        ASoC: rockchip: pdm: change dma burst to 8
        ASoC: rockchip: pdm: fix regmap_ops hang issue
        ASoC: simple-card: don't select DPCM via simple-audio-card
        ASoC: audio-graph-card: don't select DPCM via audio-graph-card
        ASoC: tlv320aic32x4: Change author's name
        ALSA: hda/realtek - Add quirk for Tuxedo XC 1509
        ...
      372686e6
    • L
      Merge tag 'acpi-5.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f2a73469
      Linus Torvalds 提交于
      Pull ACPI fix from Rafael Wysocki:
       "Fix an ACPICA issue introduced during the 4.20 development cycle and
        causing some systems to crash because of leftover operation region
        data still maintained after the operation region in question has gone
        away (Erik Schmauss)"
      
      * tag 'acpi-5.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPICA: Namespace: remove address node from global list after method termination
      f2a73469
    • L
      Merge tag 'drm-fixes-2019-04-12' of git://anongit.freedesktop.org/drm/drm · 58890f31
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "Fixes across the driver spectrum this week, the mediatek fbdev support
        might be a bit late for this round, but I looked over it and it's not
        very large and seems like a useful feature for them.
      
        Otherwise the main thing is a regression fix for i915 5.0 bug that
        caused black screens on a bunch of Dell XPS 15s I think, I know at
        least Fedora is waiting for this to land, and the udl fix is also for
        a regression since 5.0 where unplugging the device would end badly.
      
        core:
         - make atomic hooks optional
      
        i915:
         - Revert a 5.0 regression where some eDP panels stopped working
         - DSI related fixes for platforms up to IceLake
         - GVT (regression fix, warning fix, use-after free fix)
      
        amdgpu:
         - Cursor fixes
         - missing PCI ID fix for KFD
         - XGMI fix
         - shadow buffer handling after reset fix
      
        udl:
         - fix unplugging device crashes.
      
        mediatek:
         - stabilise MT2701 HDMI support
         - fbdev support
      
        tegra:
         - fix for build regression in rc1.
      
        sun4i:
         - Allwinner A6 max freq improvements
         - null ptr deref fix
      
        dw-hdmi:
         - SCDC configuration improvements
      
        omap:
         - CEC clock management policy fix"
      
      * tag 'drm-fixes-2019-04-12' of git://anongit.freedesktop.org/drm/drm: (32 commits)
        gpu: host1x: Fix compile error when IOMMU API is not available
        drm/i915/gvt: Roundup fb->height into tile's height at calucation fb->size
        drm/i915/dp: revert back to max link rate and lane count on eDP
        drm/i915/icl: Fix port disable sequence for mipi-dsi
        drm/i915/icl: Ungate ddi clocks before IO enable
        drm/mediatek: no change parent rate in round_rate() for MT2701 hdmi phy
        drm/mediatek: using new factor for tvdpll for MT2701 hdmi phy
        drm/mediatek: remove flag CLK_SET_RATE_PARENT for MT2701 hdmi phy
        drm/mediatek: make implementation of recalc_rate() for MT2701 hdmi phy
        drm/mediatek: fix the rate and divder of hdmi phy for MT2701
        drm/mediatek: fix possible object reference leak
        drm/i915: Get power refs in encoder->get_power_domains()
        drm/i915: Fix pipe_bpp readout for BXT/GLK DSI
        drm/amd/display: Fix negative cursor pos programming (v2)
        drm/sun4i: tcon top: Fix NULL/invalid pointer dereference in sun8i_tcon_top_un/bind
        drm/udl: add a release method and delay modeset teardown
        drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt()
        drm/i915/gvt: Annotate iomem usage
        drm/sun4i: DW HDMI: Lower max. supported rate for H6
        Revert "Documentation/gpu/meson: Remove link to meson_canvas.c"
        ...
      58890f31
    • W
      arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value · 045afc24
      Will Deacon 提交于
      Rather embarrassingly, our futex() FUTEX_WAKE_OP implementation doesn't
      explicitly set the return value on the non-faulting path and instead
      leaves it holding the result of the underlying atomic operation. This
      means that any FUTEX_WAKE_OP atomic operation which computes a non-zero
      value will be reported as having failed. Regrettably, I wrote the buggy
      code back in 2011 and it was upstreamed as part of the initial arm64
      support in 2012.
      
      The reasons we appear to get away with this are:
      
        1. FUTEX_WAKE_OP is rarely used and therefore doesn't appear to get
           exercised by futex() test applications
      
        2. If the result of the atomic operation is zero, the system call
           behaves correctly
      
        3. Prior to version 2.25, the only operation used by GLIBC set the
           futex to zero, and therefore worked as expected. From 2.25 onwards,
           FUTEX_WAKE_OP is not used by GLIBC at all.
      
      Fix the implementation by ensuring that the return value is either 0
      to indicate that the atomic operation completed successfully, or -EFAULT
      if we encountered a fault when accessing the user mapping.
      
      Cc: <stable@kernel.org>
      Fixes: 6170a974 ("arm64: Atomic operations")
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      045afc24
    • J
      iommu/amd: Set exclusion range correctly · 3c677d20
      Joerg Roedel 提交于
      The exlcusion range limit register needs to contain the
      base-address of the last page that is part of the range, as
      bits 0-11 of this register are treated as 0xfff by the
      hardware for comparisons.
      
      So correctly set the exclusion range in the hardware to the
      last page which is _in_ the range.
      
      Fixes: b2026aa2 ('x86, AMD IOMMU: add functions for programming IOMMU MMIO space')
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      3c677d20
    • M
      clang-format: Update with the latest for_each macro list · f16628d6
      Miguel Ojeda 提交于
      Re-run the shell fragment that generated the original list now that
      there are two dozens of new entries after v5.1's merge window.
      Signed-off-by: NMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      f16628d6
    • P
      perf/core: Fix perf_event_disable_inatomic() race · 1d54ad94
      Peter Zijlstra 提交于
      Thomas-Mich Richter reported he triggered a WARN()ing from event_function_local()
      on his s390. The problem boils down to:
      
      	CPU-A				CPU-B
      
      	perf_event_overflow()
      	  perf_event_disable_inatomic()
      	    @pending_disable = 1
      	    irq_work_queue();
      
      	sched-out
      	  event_sched_out()
      	    @pending_disable = 0
      
      					sched-in
      					perf_event_overflow()
      					  perf_event_disable_inatomic()
      					    @pending_disable = 1;
      					    irq_work_queue(); // FAILS
      
      	irq_work_run()
      	  perf_pending_event()
      	    if (@pending_disable)
      	      perf_event_disable_local(); // WHOOPS
      
      The problem exists in generic, but s390 is particularly sensitive
      because it doesn't implement arch_irq_work_raise(), nor does it call
      irq_work_run() from it's PMU interrupt handler (nor would that be
      sufficient in this case, because s390 also generates
      perf_event_overflow() from pmu::stop). Add to that the fact that s390
      is a virtual architecture and (virtual) CPU-A can stall long enough
      for the above race to happen, even if it would self-IPI.
      
      Adding a irq_work_sync() to event_sched_in() would work for all hardare
      PMUs that properly use irq_work_run() but fails for software PMUs.
      
      Instead encode the CPU number in @pending_disable, such that we can
      tell which CPU requested the disable. This then allows us to detect
      the above scenario and even redirect the IPI to make up for the failed
      queue.
      Reported-by: NThomas-Mich Richter <tmricht@linux.ibm.com>
      Tested-by: NThomas Richter <tmricht@linux.ibm.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      1d54ad94
    • D
      Merge tag 'drm-intel-fixes-2019-04-11' of... · 788f07eb
      Dave Airlie 提交于
      Merge tag 'drm-intel-fixes-2019-04-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Revert back to max link rate and lane count on eDP.
      - DSI related fixes for all platforms including Ice Lake.
      - GVT Fixes including one vGPU display plane size regression fix,
      one for preventing use-after-free in ppgtt shadow free function,
      and another warning fix for iomem access annotation.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190411235832.GA6476@intel.com
      788f07eb
    • J
      block: fix the return errno for direct IO · a89afe58
      Jason Yan 提交于
      If the last bio returned is not dio->bio, the status of the bio will
      not assigned to dio->bio if it is error. This will cause the whole IO
      status wrong.
      
          ksoftirqd/21-117   [021] ..s.  4017.966090:   8,0    C   N 4883648 [0]
                <idle>-0     [018] ..s.  4017.970888:   8,0    C  WS 4924800 + 1024 [0]
                <idle>-0     [018] ..s.  4017.970909:   8,0    D  WS 4935424 + 1024 [<idle>]
                <idle>-0     [018] ..s.  4017.970924:   8,0    D  WS 4936448 + 321 [<idle>]
          ksoftirqd/21-117   [021] ..s.  4017.995033:   8,0    C   R 4883648 + 336 [65475]
          ksoftirqd/21-117   [021] d.s.  4018.001988: myprobe1: (blkdev_bio_end_io+0x0/0x168) bi_status=7
          ksoftirqd/21-117   [021] d.s.  4018.001992: myprobe: (aio_complete_rw+0x0/0x148) x0=0xffff802f2595ad80 res=0x12a000 res2=0x0
      
      We always have to assign bio->bi_status to dio->bio.bi_status because we
      will only check dio->bio.bi_status when we return the whole IO to
      the upper layer.
      
      Fixes: 542ff7bf ("block: new direct I/O implementation")
      Cc: stable@vger.kernel.org
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Reviewed-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NJason Yan <yanaijie@huawei.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      a89afe58
    • L
      Merge tag 'for-5.1-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 2d06b235
      Linus Torvalds 提交于
      Pull btrfs fixes from David Sterba:
      
       - fix parsing of compression algorithm when set as a inode property,
         this could end up with eg. 'zst' or 'zli' in the value
      
       - don't allow trim on a filesystem with unreplayed log, this could
         cause data loss if there are pending updates to the block groups that
         would not be subject to trim after replay
      
      * tag 'for-5.1-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: prop: fix vanished compression property after failed set
        btrfs: prop: fix zstd compression parameter validation
        Btrfs: do not allow trimming when a fs is mounted with the nologreplay option
      2d06b235
    • D
      Merge tag 'drm-misc-fixes-2019-04-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · ffb5d6fe
      Dave Airlie 提交于
       - core: Make atomic_enable and disable optional for CRTC
       - dw-hdmi: Lower max frequency for the Allwinner H6, SCDC configuration
                  improvements for older controller versions
       - omap: a fix for the CEC clock management policy
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <maxime.ripard@bootlin.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190411151658.orm46ccd5zmrw27l@flea
      ffb5d6fe
    • T
      Revert "SUNRPC: Micro-optimise when the task is known not to be sleeping" · af6b61d7
      Trond Myklebust 提交于
      This reverts commit 009a82f6.
      
      The ability to optimise here relies on compiler being able to optimise
      away tail calls to avoid stack overflows. Unfortunately, we are seeing
      reports of problems, so let's just revert.
      Reported-by: NDaniel Mack <daniel@zonque.org>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      af6b61d7
    • O
      NFSv4.1 fix incorrect return value in copy_file_range · 0769663b
      Olga Kornievskaia 提交于
      According to the NFSv4.2 spec if the input and output file is the
      same file, operation should fail with EINVAL. However, linux
      copy_file_range() system call has no such restrictions. Therefore,
      in such case let's return EOPNOTSUPP and allow VFS to fallback
      to doing do_splice_direct(). Also when copy_file_range is called
      on an NFSv4.0 or 4.1 mount (ie., a server that doesn't support
      COPY functionality), we also need to return EOPNOTSUPP and
      fallback to a regular copy.
      
      Fixes xfstest generic/075, generic/091, generic/112, generic/263
      for all NFSv4.x versions.
      Signed-off-by: NOlga Kornievskaia <kolga@netapp.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      0769663b
    • C
      xprtrdma: Fix helper that drains the transport · e1ede312
      Chuck Lever 提交于
      We want to drain only the RQ first. Otherwise the transport can
      deadlock on ->close if there are outstanding Send completions.
      
      Fixes: 6d2d0ee2 ("xprtrdma: Replace rpcrdma_receive_wq ... ")
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Cc: stable@vger.kernel.org # v5.0+
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      e1ede312
    • C
      NFS: Fix handling of reply page vector · 29e7ca71
      Chuck Lever 提交于
      NFSv4 GETACL and FS_LOCATIONS requests stopped working in v5.1-rc.
      
      These two need the extra padding to be added directly to the reply
      length.
      Reported-by: NOlga Kornievskaia <aglo@umich.edu>
      Fixes: 02ef04e4 ("NFS: Account for XDR pad of buf->pages")
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Tested-by: NOlga Kornievskaia <aglo@umich.edu>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      29e7ca71
    • T
      NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family. · 7c2bd9a3
      Tetsuo Handa 提交于
      syzbot is reporting uninitialized value at rpc_sockaddr2uaddr() [1]. This
      is because syzbot is setting AF_INET6 to "struct sockaddr_in"->sin_family
      (which is embedded into user-visible "struct nfs_mount_data" structure)
      despite nfs23_validate_mount_data() cannot pass sizeof(struct sockaddr_in6)
      bytes of AF_INET6 address to rpc_sockaddr2uaddr().
      
      Since "struct nfs_mount_data" structure is user-visible, we can't change
      "struct nfs_mount_data" to use "struct sockaddr_storage". Therefore,
      assuming that everybody is using AF_INET family when passing address via
      "struct nfs_mount_data"->addr, reject if its sin_family is not AF_INET.
      
      [1] https://syzkaller.appspot.com/bug?id=599993614e7cbbf66bc2656a919ab2a95fb5d75cReported-by: Nsyzbot <syzbot+047a11c361b872896a4f@syzkaller.appspotmail.com>
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      7c2bd9a3
    • S
      dma-debug: only skip one stackframe entry · 8c516543
      Scott Wood 提交于
      With skip set to 1, I get a traceback like this:
      
      [  106.867637] DMA-API: Mapped at:
      [  106.870784]  afu_dma_map_region+0x2cd/0x4f0 [dfl_afu]
      [  106.875839]  afu_ioctl+0x258/0x380 [dfl_afu]
      [  106.880108]  do_vfs_ioctl+0xa9/0x720
      [  106.883688]  ksys_ioctl+0x60/0x90
      [  106.887007]  __x64_sys_ioctl+0x16/0x20
      
      With the previous value of 2, afu_dma_map_region was being omitted.  I
      suspect that the code paths have simply changed since the value of 2 was
      chosen a decade ago, but it's also possible that it varies based on which
      mapping function was used, compiler inlining choices, etc.  In any case,
      it's best to err on the side of skipping less.
      Signed-off-by: NScott Wood <swood@redhat.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      8c516543
    • S
      platform/x86: pmc_atom: Drop __initconst on dmi table · b995dcca
      Stephen Boyd 提交于
      It's used by probe and that isn't an init function. Drop this so that we
      don't get a section mismatch.
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Cc: David Müller <dave.mueller@gmx.ch>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Fixes: 7c2e0713 ("clk: x86: Add system specific quirk to mark clocks as critical")
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      b995dcca