1. 29 Mar, 2019 8 commits
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.1' of... · 0e40da3e
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Remove harmful -Oz option of Clang
      
       - Get back the original behavior (no recursion for in-tree build) for
         GNU Make 4.x
      
       - Some minor fixes for coccinelle patches
      
       - Do not overwrite .gitignore in the output directory in case it is
         version-controlled
      
       - Fix missed record-mcount bug for dynamic ftrace
      
       - Fix endianness bug in modversions for relative CRC
      
       - Cater to '^H' key code in Kconfig ncurses programs
      
      * tag 'kbuild-fixes-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kconfig/[mn]conf: handle backspace (^H) key
        kbuild: modversions: Fix relative CRC byte order interpretation
        scripts: coccinelle: Fix description of badty.cocci
        kbuild: strip whitespace in cmd_record_mcount findstring
        kbuild: do not overwrite .gitignore in output directory
        kbuild: skip parsing pre sub-make code for recursion
        coccinelle: put_device: reduce false positives
        kbuild: skip sub-make for in-tree build with GNU Make 4.x
        Revert "kbuild: use -Oz instead of -Os when using clang"
      0e40da3e
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190329' of git://git.kernel.dk/linux-block · ffb8e45c
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Small set of fixes that should go into this series. This contains:
      
         - compat signal mask fix for io_uring (Arnd)
      
         - EAGAIN corner case for direct vs buffered writes for io_uring
           (Roman)
      
         - NVMe pull request from Christoph with various little fixes
      
         - sbitmap ws_active fix, which caused a perf regression for shared
           tags (me)
      
         - sbitmap bit ordering fix (Ming)
      
         - libata on-stack DMA fix (Raymond)"
      
      * tag 'for-linus-20190329' of git://git.kernel.dk/linux-block:
        nvmet: fix error flow during ns enable
        nvmet: fix building bvec from sg list
        nvme-multipath: relax ANA state check
        nvme-tcp: fix an endianess miss-annotation
        libata: fix using DMA buffers on stack
        io_uring: offload write to async worker in case of -EAGAIN
        sbitmap: order READ/WRITE freed instance and setting clear bit
        blk-mq: fix sbitmap ws_active for shared tags
        io_uring: fix big-endian compat signal mask handling
        blk-mq: update comment for blk_mq_hctx_has_pending()
        blk-mq: use blk_mq_put_driver_tag() to put tag
      ffb8e45c
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.1-rc3' of git://github.com/ceph/ceph-client · 7376e39a
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "A patch to avoid choking on multipage bvecs in the messenger and a
        small use-after-free fix"
      
      * tag 'ceph-for-5.1-rc3' of git://github.com/ceph/ceph-client:
        ceph: fix use-after-free on symlink traversal
        libceph: fix breakage caused by multipage bvecs
      7376e39a
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.1-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · c6503f12
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
       "Here are a few fixes for some corruption bugs and uninitialized
        variable problems. The few patches here have gone through a few days
        worth of fstest runs with no new problems observed.
      
        Changes since last update:
      
         - Fix a bunch of static checker complaints about uninitialized
           variables and insufficient range checks.
      
         - Avoid a crash when incore extent map data are corrupt.
      
         - Disallow FITRIM when we haven't recovered the log and know the
           metadata are stale.
      
         - Fix a data corruption when doing unaligned overlapping dio writes"
      
      * tag 'xfs-5.1-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: serialize unaligned dio writes against all other dio writes
        xfs: prohibit fstrim in norecovery mode
        xfs: always init bma in xfs_bmapi_write
        xfs: fix btree scrub checking with regards to root-in-inode
        xfs: dabtree scrub needs to range-check level
        xfs: don't trip over uninitialized buffer on extent read of corrupted inode
      c6503f12
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-03-29' of git://anongit.freedesktop.org/drm/drm · 9df0ef6c
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Weekly fixes roundup, nothing two serious, some usb device regressions
        are fixed, and i915 GVT has a bigger fix but otherwise not really much
        happening here.
      
        core:
         - fb bpp check regression fix
         - release/unplug fix
         - use after free fixes
      
        i915:
         - fix mmap range checks
         - fix gvt ppgtt mm LRU list access races
         - fix selftest error pointer check
         - fix a macro definition (pre-emptive for potential further backports)
         - fix one AML SKU ULX status
      
        amdgpu:
         - one variable refresh rate fix
      
        udl:
         - fix EDID reading
      
        tegra:
         - build/warning fixes
      
        meson:
         - cleanup path fixes
         - TMDS clock filter fix
      
        rockchip:
         - NV12 buffers and scalar fix"
      
      * tag 'drm-fixes-2019-03-29' of git://anongit.freedesktop.org/drm/drm: (22 commits)
        drm/i915/icl: Fix VEBOX mismatch BUG_ON()
        drm/i915/selftests: Fix an IS_ERR() vs NULL check
        drm/i915: Mark AML 0x87CA as ULX
        drm/meson: fix TMDS clock filtering for DMT monitors
        drm/meson: Uninstall IRQ handler
        drm/meson: Fix invalid pointer in meson_drv_unbind()
        drm/udl: Refactor edid retrieving in UDL driver (v2)
        drm: Fix drm_release() and device unplug
        drm/fb: avoid setting 0 depth.
        drm/tegra: vic: Fix implicit function declaration warning
        drm/tegra: hub: Fix dereference before check
        drm/i915/icl: Fix the TRANS_DDI_FUNC_CTL2 bitfield macro
        drm/amd/display: Only allow VRR when vrefresh is within supported range
        drm/rockchip: vop: reset scale mode when win is disabled
        drm/vkms: fix use-after-free when drm_gem_handle_create() fails
        drm/vgem: fix use-after-free when drm_gem_handle_create() fails
        drm/i915/gvt: Add mutual lock for ppgtt mm LRU list
        drm/i915/gvt: Only assign ppgtt root at dispatch time
        drm/i915/gvt: Don't submit request for error workload dispatch
        drm/i915/gvt: stop scheduling workload when vgpu is inactive
        ...
      9df0ef6c
    • Changbin Du's avatar
      kconfig/[mn]conf: handle backspace (^H) key · 9c38f1f0
      Changbin Du authored
      Backspace is not working on some terminal emulators which do not send the
      key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127).
      But currently only '^?' is handled. Let's also handle '^H' for those
      terminals.
      Signed-off-by: default avatarChangbin Du <changbin.du@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      9c38f1f0
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2019-03-28' of... · 0271ab11
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2019-03-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.2-rc3:
      - fix mmap range checks
      - fix gvt ppgtt mm LRU list access races
      - fix selftest error pointer check
      - fix a macro definition (pre-emptive for potential further backports)
      - fix one AML SKU ULX status
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87sgv6ao7a.fsf@intel.com
      0271ab11
    • Dave Airlie's avatar
  2. 28 Mar, 2019 19 commits
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.1-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 9936328b
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "PCI fixes:
      
         - Clear level-triggered interrupts for the bandwidth notification
           supported added for v5.1 (Alexandru Gagniuc)
      
         - Clear bandwidth notification interrupts before enabling them (Lukas
           Wunner)
      
         - Report post-enumeration bandwidth changes only once for
           multi-function devices (Lukas Wunner)"
      
      * tag 'pci-v5.1-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/LINK: Deduplicate bandwidth reports for multi-function devices
        PCI/LINK: Clear bandwidth notification interrupt before enabling it
        PCI/LINK: Supply IRQ handler so level-triggered IRQs are acked
      9936328b
    • Jens Axboe's avatar
      Merge branch 'nvme-5.1' of git://git.infradead.org/nvme into for-linus · 7bca889e
      Jens Axboe authored
      Pull NVMe fixes from Christoph:
      
      "A few accumulated small fixes:
      
       - fix an endianess misannotation that sneaked in this merge window in
         nvme-tcp (me)
       - fix nvme-loop to handle multi-page segments (Ming)
       - fix error handling in the nvmet configfs code (Max)
       - add a missing requeue point in the multipath code (Martin George)"
      
      * 'nvme-5.1' of git://git.infradead.org/nvme:
        nvmet: fix error flow during ns enable
        nvmet: fix building bvec from sg list
        nvme-multipath: relax ANA state check
        nvme-tcp: fix an endianess miss-annotation
      7bca889e
    • Max Gurtovoy's avatar
      nvmet: fix error flow during ns enable · a536b497
      Max Gurtovoy authored
      In case we fail to enable p2pmem on the current namespace, disable the
      backing store device before exiting.
      
      Cc: Stephen Bates <sbates@raithlin.com>
      Signed-off-by: default avatarMax Gurtovoy <maxg@mellanox.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      a536b497
    • Ming Lei's avatar
      nvmet: fix building bvec from sg list · 02db9954
      Ming Lei authored
      There are two mistakes for building bvec from sg list for file
      backed ns:
      
      - use request data length to compute number of io vector, this way
      doesn't consider sg->offset, and the result may be smaller than required
      io vectors
      
      - bvec->bv_len isn't capped by sg->length
      
      This patch fixes this issue by building bvec from sg directly, given
      the whole IO stack is ready for multi-page bvec.
      Reported-by: default avatarYi Zhang <yi.zhang@redhat.com>
      Fixes: 3a85a5de ("nvme-loop: add a NVMe loopback host driver")
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      02db9954
    • Martin George's avatar
      nvme-multipath: relax ANA state check · cc2278c4
      Martin George authored
      When undergoing state transitions I/O might be requeued, hence
      we should always call nvme_mpath_set_live() to schedule requeue_work
      whenever the nvme device is live, independent on whether the
      old state was live or not.
      Signed-off-by: default avatarMartin George <marting@netapp.com>
      Signed-off-by: default avatarGargi Srinivas <sring@netapp.com>
      Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      cc2278c4
    • Christoph Hellwig's avatar
      nvme-tcp: fix an endianess miss-annotation · 988aef9e
      Christoph Hellwig authored
      nvme_tcp_end_request just takes the status value and the converts
      it to little endian as well as shifting for the phase bit.
      
      Fixes: 43ce38a6d823 ("nvme-tcp: support C2HData with SUCCESS flag")
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
      988aef9e
    • David Howells's avatar
      afs: Fix StoreData op marshalling · 8c7ae38d
      David Howells authored
      The marshalling of AFS.StoreData, AFS.StoreData64 and YFS.StoreData64 calls
      generated by ->setattr() ops for the purpose of expanding a file is
      incorrect due to older documentation incorrectly describing the way the RPC
      'FileLength' parameter is meant to work.
      
      The older documentation says that this is the length the file is meant to
      end up at the end of the operation; however, it was never implemented this
      way in any of the servers, but rather the file is truncated down to this
      before the write operation is effected, and never expanded to it (and,
      indeed, it was renamed to 'TruncPos' in 2014).
      
      Fix this by setting the position parameter to the new file length and doing
      a zero-lengh write there.
      
      The bug causes Xwayland to SIGBUS due to unexpected non-expansion of a file
      it then mmaps.  This can be tested by giving the following test program a
      filename in an AFS directory:
      
      	#include <stdio.h>
      	#include <stdlib.h>
      	#include <unistd.h>
      	#include <fcntl.h>
      	#include <sys/mman.h>
      	int main(int argc, char *argv[])
      	{
      		char *p;
      		int fd;
      		if (argc != 2) {
      			fprintf(stderr,
      				"Format: test-trunc-mmap <file>\n");
      			exit(2);
      		}
      		fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC);
      		if (fd < 0) {
      			perror(argv[1]);
      			exit(1);
      		}
      		if (ftruncate(fd, 0x140008) == -1) {
      			perror("ftruncate");
      			exit(1);
      		}
      		p = mmap(NULL, 4096, PROT_READ | PROT_WRITE,
      			 MAP_SHARED, fd, 0);
      		if (p == MAP_FAILED) {
      			perror("mmap");
      			exit(1);
      		}
      		p[0] = 'a';
      		if (munmap(p, 4096) < 0) {
      			perror("munmap");
      			exit(1);
      		}
      		if (close(fd) < 0) {
      			perror("close");
      			exit(1);
      		}
      		exit(0);
      	}
      
      Fixes: 31143d5d ("AFS: implement basic file write support")
      Reported-by: default avatarJonathan Billings <jsbillin@umich.edu>
      Tested-by: default avatarJonathan Billings <jsbillin@umich.edu>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8c7ae38d
    • David Howells's avatar
      vfs: Update mount API docs · 7d6ab823
      David Howells authored
      Update the mount API docs to reflect recent changes to the code.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7d6ab823
    • Linus Torvalds's avatar
      Merge tag 's390-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · bfed6d0f
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
       "Improvements and bug fixes for 5.1-rc2:
      
         - Fix early free of the channel program in vfio
      
         - On AP device removal make sure that all messages are flushed with
           the driver still attached that queued the message
      
         - Limit brk randomization to 32MB to reduce the chance that the heap
           of ld.so is placed after the main stack
      
         - Add a rolling average for the steal time of a CPU, this will be
           needed for KVM to decide when to do busy waiting
      
         - Fix a warning in the CPU-MF code
      
         - Add a notification handler for AP configuration change to react
           faster to new AP devices"
      
      * tag 's390-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/cpumf: Fix warning from check_processor_id
        zcrypt: handle AP Info notification from CHSC SEI command
        vfio: ccw: only free cp on final interrupt
        s390/vtime: steal time exponential moving average
        s390/zcrypt: revisit ap device remove procedure
        s390: limit brk randomization to 32MB
      bfed6d0f
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 97c41a6b
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "A couple of minor fixes only for now
      
         - fix for incorrect DMA channels on Renesas R-Car
      
         - Broadcom bcm2835 error handling fixes
      
         - Kconfig dependency fixes for bcm2835 and davinci
      
         - CPU idle wakeup fix for i.MX6
      
         - MMC regression on Tegra186
      
         - fix incorrect phy settings on one imx board"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: tegra: Disable CQE Support for SDMMC4 on Tegra186
        ARM: dts: nomadik: Fix polarity of SPI CS
        ARM: davinci: fix build failure with allnoconfig
        ARM: imx_v4_v5_defconfig: enable PWM driver
        ARM: imx_v6_v7_defconfig: continue compiling the pwm driver
        ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch
        ARM: dts: imx6qdl: Fix typo in imx6qdl-icore-rqs.dtsi
        ARM: dts: imx6ull: Use the correct style for SPDX License Identifier
        ARM: dts: pfla02: increase phy reset duration
        ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time
        ARM: imx51: fix a leaked reference by adding missing of_node_put
        ARM: dts: imx6dl-yapp4: Use rgmii-id phy mode on the cpu port
        arm64: bcm2835: Add missing dependency on MFD_CORE.
        ARM: dts: bcm283x: Fix hdmi hpd gpio pull
        soc: bcm: bcm2835-pm: Fix error paths of initialization.
        soc: bcm: bcm2835-pm: Fix PM_IMAGE_PERI power domain support.
        arm64: dts: renesas: r8a774c0: Fix SCIF5 DMA channels
        arm64: dts: renesas: r8a77990: Fix SCIF5 DMA channels
      97c41a6b
    • Fredrik Noring's avatar
      kbuild: modversions: Fix relative CRC byte order interpretation · 54a7151b
      Fredrik Noring authored
      Fix commit 56067812 ("kbuild: modversions: add infrastructure for
      emitting relative CRCs") where CRCs are interpreted in host byte order
      rather than proper kernel byte order. The bug is conditional on
      CONFIG_MODULE_REL_CRCS.
      
      For example, when loading a BE module into a BE kernel compiled with a LE
      system, the error "disagrees about version of symbol module_layout" is
      produced. A message such as "Found checksum D7FA6856 vs module 5668FAD7"
      will be given with debug enabled, which indicates an obvious endian
      problem within __kcrctab within the kernel image.
      
      The general solution is to use the macro TO_NATIVE, as is done in
      similar cases throughout modpost.c. With this correction it has been
      verified that a BE kernel compiled with a LE system accepts BE modules.
      
      This change has also been verified with a LE kernel compiled with a LE
      system, in which case TO_NATIVE returns its value unmodified since the
      byte orders match. This is by far the common case.
      
      Fixes: 56067812 ("kbuild: modversions: add infrastructure for emitting relative CRCs")
      Signed-off-by: default avatarFredrik Noring <noring@nocrew.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      54a7151b
    • Michael Stefaniuc's avatar
      scripts: coccinelle: Fix description of badty.cocci · 7fcddf7c
      Michael Stefaniuc authored
      Summary was copy and pasted from array_size.cocci.
      Signed-off-by: default avatarMichael Stefaniuc <mstefani@mykolab.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      7fcddf7c
    • Joe Lawrence's avatar
      kbuild: strip whitespace in cmd_record_mcount findstring · 1a49b2fd
      Joe Lawrence authored
      CC_FLAGS_FTRACE may contain trailing whitespace that interferes with
      findstring.
      
      For example, commit 6977f95e ("powerpc: avoid -mno-sched-epilog on
      GCC 4.9 and newer") introduced a change such that on my ppc64le box,
      CC_FLAGS_FTRACE="-pg -mprofile-kernel ".  (Note the trailing space.)
      When cmd_record_mcount is now invoked, findstring fails as the ftrace
      flags were found at very end of _c_flags, without the trailing space.
      
        _c_flags=" ... -pg -mprofile-kernel"
        CC_FLAGS_FTRACE="-pg -mprofile-kernel "
                                             ^
          findstring is looking for this extra space
      
      Remove the redundant whitespaces from CC_FLAGS_FTRACE in
      cmd_record_mcount to avoid this problem.
      
      [masahiro.yamada: This issue only happens in the released versions
      of GNU Make. CC_FLAGS_FTRACE will not contain the trailing space if
      you use the latest GNU Make, which contains commit b90fabc8d6f3
      ("* NEWS: Do not insert a space during '+=' if the value is empty.") ]
      
      Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com> (refactoring)
      Fixes: 6977f95e ("powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer").
      Signed-off-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
      Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      1a49b2fd
    • Masahiro Yamada's avatar
      kbuild: do not overwrite .gitignore in output directory · 156e7cbb
      Masahiro Yamada authored
      Commit 3a51ff34 ("kbuild: gitignore output directory") seemed to
      bother people who version-control output directories.
      
      Andre Przywara says:
      "Unfortunately this breaks my setup, because I keep a totally separate
      git repository in my build directories to track (various versions of)
      .config. So .gitignore there is carefully crafted to ignore most build
      artefacts, but not .config, for instance."
      
      Link: https://lkml.org/lkml/2019/3/22/1819Reported-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Reviewed-by: default avatarAndre Przywara <andre.przywara@arm.com>
      156e7cbb
    • Masahiro Yamada's avatar
      kbuild: skip parsing pre sub-make code for recursion · 221cc2d2
      Masahiro Yamada authored
      When Make recurses to the top Makefile with sub-make-done unset,
      the code block surrounded by 'ifneq ($(sub-make-done),1) ... endif'
      is parsed multiple times. This happens for in-tree building of
      include/config/auto.conf, *-pkg, etc. with GNU Make 4.x.
      
      This is a slight regression by commit 688931a5 ("kbuild: skip
      sub-make for in-tree build with GNU Make 4.x") in terms of performance
      since that code block contains one $(shell ...) invocation.
      
      Fix it by exporting the variable irrespective of sub-make being run.
      I renamed it because GNU Make cannot properly export variables
      containing hyphens. This is probably a bug of GNU Make, and the issue
      in Kbuild had already been reported by commit 2bfbe788 ("kbuild:
      Do not use hyphen in exported variable name").
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      221cc2d2
    • Wen Yang's avatar
      coccinelle: put_device: reduce false positives · 7265f5b7
      Wen Yang authored
      Don't complain about a return when this function returns "&pdev->dev".
      
      Fixes: da9cfb87 ("coccinelle: semantic code search for missing put_device()")
      Reported-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      7265f5b7
    • raymond pang's avatar
      libata: fix using DMA buffers on stack · dd08a8d9
      raymond pang authored
      When CONFIG_VMAP_STACK=y, __pa() returns incorrect physical address for
      a stack virtual address. Stack DMA buffers must be avoided.
      Signed-off-by: default avatarraymond pang <raymondpangxd@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      dd08a8d9
    • José Roberto de Souza's avatar
      drm/i915/icl: Fix VEBOX mismatch BUG_ON() · 26cdaac4
      José Roberto de Souza authored
      GT VEBOX DISABLE is only 4 bits wide but it was using a 8 bits wide
      mask, the remaning reserved bits is set to 0 causing 4 more
      nonexistent VEBOX engines being detected as enabled, triggering the
      BUG_ON() because of mismatch between vebox_mask and newly added
      VEBOX_MASK().
      
      [   64.081621] [drm:intel_device_info_init_mmio [i915]] vdbox enable: 0005, instances: 0005
      [   64.081763] [drm:intel_device_info_init_mmio [i915]] vebox enable: 00f1, instances: 0001
      [   64.081825] intel_device_info_init_mmio:925 GEM_BUG_ON(vebox_mask != ({ unsigned int first__ = (VECS0); unsigned int count__ = (2); ((&(dev_priv)->__info)->engine_mask & (((~0UL) - (1UL << (first__)) + 1) & (~0UL >> (64 - 1 - (first__ + count__ - 1))))) >> first__; }))
      [   64.082047] ------------[ cut here ]------------
      [   64.082054] kernel BUG at drivers/gpu/drm/i915/intel_device_info.c:925!
      
      BSpec: 20680
      Fixes: 26376a7e ("drm/i915/icl: Check for fused-off VDBOX and VEBOX instances")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Oscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190326230223.26336-1-jose.souza@intel.com
      (cherry picked from commit 547fcf9b)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      26cdaac4
    • Thomas Richter's avatar
      s390/cpumf: Fix warning from check_processor_id · b6ffdf27
      Thomas Richter authored
      Function __hw_perf_event_init() used a CPU variable without
      ensuring CPU preemption has been disabled. This caused the
      following warning in the kernel log:
      
        [ 7.277085] BUG: using smp_processor_id() in preemptible
                       [00000000] code: cf-csdiag/1892
        [ 7.277111] caller is cf_diag_event_init+0x13a/0x338
        [ 7.277122] CPU: 10 PID: 1892 Comm: cf-csdiag Not tainted
                       5.0.0-20190318.rc0.git0.9e1a11e0f602.300.fc29.s390x+debug #1
        [ 7.277131] Hardware name: IBM 2964 NC9 712 (LPAR)
        [ 7.277139] Call Trace:
        [ 7.277150] ([<000000000011385a>] show_stack+0x82/0xd0)
        [ 7.277161]  [<0000000000b7a71a>] dump_stack+0x92/0xd0
        [ 7.277174]  [<00000000007b7e9c>] check_preemption_disabled+0xe4/0x100
        [ 7.277183]  [<00000000001228aa>] cf_diag_event_init+0x13a/0x338
        [ 7.277195]  [<00000000002cf3aa>] perf_try_init_event+0x72/0xf0
        [ 7.277204]  [<00000000002d0bba>] perf_event_alloc+0x6fa/0xce0
        [ 7.277214]  [<00000000002dc4a8>] __s390x_sys_perf_event_open+0x398/0xd50
        [ 7.277224]  [<0000000000b9e8f0>] system_call+0xdc/0x2d8
        [ 7.277233] 2 locks held by cf-csdiag/1892:
        [ 7.277241]  #0: 00000000976f5510 (&sig->cred_guard_mutex){+.+.},
                        at: __s390x_sys_perf_event_open+0xd2e/0xd50
        [ 7.277257]  #1: 00000000363b11bd (&pmus_srcu){....},
                        at: perf_event_alloc+0x52e/0xce0
      
      The variable is now accessed in proper context. Use
      get_cpu_var()/put_cpu_var() pair to disable
      preemption during access.
      As the hardware authorization settings apply to all CPUs, it
      does not matter which CPU is used to check the authorization setting.
      
      Remove the event->count assignment. It is not needed as function
      perf_event_alloc() allocates memory for the event with kzalloc() and
      thus count is already set to zero.
      
      Fixes: fe5908bc ("s390/cpum_cf_diag: Add support for s390 counter facility diagnostic trace")
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      b6ffdf27
  3. 27 Mar, 2019 3 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 1a9df9e2
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Fixes here and there, a couple new device IDs, as usual:
      
         1) Fix BQL race in dpaa2-eth driver, from Ioana Ciornei.
      
         2) Fix 64-bit division in iwlwifi, from Arnd Bergmann.
      
         3) Fix documentation for some eBPF helpers, from Quentin Monnet.
      
         4) Some UAPI bpf header sync with tools, also from Quentin Monnet.
      
         5) Set descriptor ownership bit at the right time for jumbo frames in
            stmmac driver, from Aaro Koskinen.
      
         6) Set IFF_UP properly in tun driver, from Eric Dumazet.
      
         7) Fix load/store doubleword instruction generation in powerpc eBPF
            JIT, from Naveen N. Rao.
      
         8) nla_nest_start() return value checks all over, from Kangjie Lu.
      
         9) Fix asoc_id handling in SCTP after the SCTP_*_ASSOC changes this
            merge window. From Marcelo Ricardo Leitner and Xin Long.
      
        10) Fix memory corruption with large MTUs in stmmac, from Aaro
            Koskinen.
      
        11) Do not use ipv4 header for ipv6 flows in TCP and DCCP, from Eric
            Dumazet.
      
        12) Fix topology subscription cancellation in tipc, from Erik Hugne.
      
        13) Memory leak in genetlink error path, from Yue Haibing.
      
        14) Valid control actions properly in packet scheduler, from Davide
            Caratti.
      
        15) Even if we get EEXIST, we still need to rehash if a shrink was
            delayed. From Herbert Xu.
      
        16) Fix interrupt mask handling in interrupt handler of r8169, from
            Heiner Kallweit.
      
        17) Fix leak in ehea driver, from Wen Yang"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (168 commits)
        dpaa2-eth: fix race condition with bql frame accounting
        chelsio: use BUG() instead of BUG_ON(1)
        net: devlink: skip info_get op call if it is not defined in dumpit
        net: phy: bcm54xx: Encode link speed and activity into LEDs
        tipc: change to check tipc_own_id to return in tipc_net_stop
        net: usb: aqc111: Extend HWID table by QNAP device
        net: sched: Kconfig: update reference link for PIE
        net: dsa: qca8k: extend slave-bus implementations
        net: dsa: qca8k: remove leftover phy accessors
        dt-bindings: net: dsa: qca8k: support internal mdio-bus
        dt-bindings: net: dsa: qca8k: fix example
        net: phy: don't clear BMCR in genphy_soft_reset
        bpf, libbpf: clarify bump in libbpf version info
        bpf, libbpf: fix version info and add it to shared object
        rxrpc: avoid clang -Wuninitialized warning
        tipc: tipc clang warning
        net: sched: fix cleanup NULL pointer exception in act_mirr
        r8169: fix cable re-plugging issue
        net: ethernet: ti: fix possible object reference leak
        net: ibm: fix possible object reference leak
        ...
      1a9df9e2
    • Al Viro's avatar
      ceph: fix use-after-free on symlink traversal · daf5cc27
      Al Viro authored
      free the symlink body after the same RCU delay we have for freeing the
      struct inode itself, so that traversal during RCU pathwalk wouldn't step
      into freed memory.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      daf5cc27
    • Dan Carpenter's avatar
      drm/i915/selftests: Fix an IS_ERR() vs NULL check · 71cd6cb2
      Dan Carpenter authored
      The live_context() function returns error pointers.  It never returns
      NULL.
      
      Fixes: 9c1477e8 ("drm/i915/selftests: Exercise adding requests to a full GGTT")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190326050843.GA20038@kadam
      (cherry picked from commit 602cbe8e)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      71cd6cb2
  4. 26 Mar, 2019 10 commits