1. 18 Aug, 2019 7 commits
    • Linus Torvalds's avatar
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 645c03aa
      Linus Torvalds authored
      Pull EFI fix from Thomas Gleixner:
       "A single fix for a EFI mixed mode regression caused by recent rework
        which did not take the firmware bitwidth into account"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi-stub: Fix get_efi_config_table on mixed-mode setups
      645c03aa
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx · 5bba5c9c
      Linus Torvalds authored
      Pull SPDX fixes from Greg KH:
       "Here are four small SPDX fixes for 5.3-rc5.
      
        A few style fixes for some SPDX comments, added an SPDX tag for one
        file, and fix up some GPL boilerplate for another file.
      
        All of these have been in linux-next for a few weeks with no reported
        issues (they are comment changes only, so that's to be expected...)"
      
      * tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
        i2c: stm32: Use the correct style for SPDX License Identifier
        intel_th: Use the correct style for SPDX License Identifier
        coccinelle: api/atomic_as_refcounter: add SPDX License Identifier
        kernel/configs: Replace GPL boilerplate code with SPDX identifier
      5bba5c9c
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 4503c0a4
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 5.3-rc5.
      
        These are two different subsystems needing some fixes, the habanalabs
        driver which is has some more big endian fixes for problems found. The
        other are some small soundwire fixes, including some Kconfig
        dependencies needed to resolve reported build errors.
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'char-misc-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        misc: xilinx-sdfec: fix dependency and build error
        habanalabs: fix device IRQ unmasking for BE host
        habanalabs: fix endianness handling for internal QMAN submission
        habanalabs: fix completion queue handling when host is BE
        habanalabs: fix endianness handling for packets from user
        habanalabs: fix DRAM usage accounting on context tear down
        habanalabs: Avoid double free in error flow
        soundwire: fix regmap dependencies and align with other serial links
        soundwire: cadence_master: fix definitions for INTSTAT0/1
        soundwire: cadence_master: fix register definition for SLAVE_STATE
      4503c0a4
    • Linus Torvalds's avatar
      Merge tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · ae1a616a
      Linus Torvalds authored
      Pull staging/IIO fixes from Greg KH:
       "Here are four small staging and iio driver fixes for 5.3-rc5
      
        Two are for the dt3000 comedi driver for some reported problems found
        in that codebase, and two are some small iio fixes.
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: dt3000: Fix rounding up of timer divisor
        staging: comedi: dt3000: Fix signed integer overflow 'divider * base'
        iio: adc: max9611: Fix temperature reading in probe
        iio: frequency: adf4371: Fix output frequency setting
      ae1a616a
    • Linus Torvalds's avatar
      Merge tag 'usb-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 359334ca
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are number of small USB fixes for 5.3-rc5.
      
        Syzbot has been on a tear recently now that it has some good USB
        debugging hooks integrated, so there's a number of fixes in here found
        by those tools for some _very_ old bugs. Also a handful of gadget
        driver fixes for reported issues, some hopefully-final dma fixes for
        host controller drivers, and some new USB serial gadget driver ids.
      
        All of these have been in linux-next this week with no reported issues
        (the usb-serial ones were in linux-next in its own branch, but merged
        into mine on Friday)"
      
      * tag 'usb-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: add a hcd_uses_dma helper
        usb: don't create dma pools for HCDs with a localmem_pool
        usb: chipidea: imx: fix EPROBE_DEFER support during driver probe
        usb: host: fotg2: restart hcd after port reset
        USB: CDC: fix sanity checks in CDC union parser
        usb: cdc-acm: make sure a refcount is taken early enough
        USB: serial: option: add the BroadMobi BM818 card
        USB: serial: option: Add Motorola modem UARTs
        USB: core: Fix races in character device registration and deregistraion
        usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt
        usb: gadget: composite: Clear "suspended" on reset/disconnect
        usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"
        USB: serial: option: add D-Link DWM-222 device ID
        USB: serial: option: Add support for ZTE MF871A
      359334ca
    • Linus Torvalds's avatar
      Merge tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block · 8fde2832
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A collection of fixes that should go into this series. This contains:
      
         - Revert of the REQ_NOWAIT_INLINE and associated dio changes. There
           were still corner cases there, and even though I had a solution for
           it, it's too involved for this stage. (me)
      
         - Set of NVMe fixes (via Sagi)
      
         - io_uring fix for fixed buffers (Anthony)
      
         - io_uring defer issue fix (Jackie)
      
         - Regression fix for queue sync at exit time (zhengbin)
      
         - xen blk-back memory leak fix (Wenwen)"
      
      * tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block:
        io_uring: fix an issue when IOSQE_IO_LINK is inserted into defer list
        block: remove REQ_NOWAIT_INLINE
        io_uring: fix manual setup of iov_iter for fixed buffers
        xen/blkback: fix memory leaks
        blk-mq: move cancel of requeue_work to the front of blk_exit_queue
        nvme-pci: Fix async probe remove race
        nvme: fix controller removal race with scan work
        nvme-rdma: fix possible use-after-free in connect error flow
        nvme: fix a possible deadlock when passthru commands sent to a multipath device
        nvme-core: Fix extra device_put() call on error path
        nvmet-file: fix nvmet_file_flush() always returning an error
        nvmet-loop: Flush nvme_delete_wq when removing the port
        nvmet: Fix use-after-free bug when a port is removed
        nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns
      8fde2832
    • Linus Torvalds's avatar
      Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux · 85d8d3b1
      Linus Torvalds authored
      Pull Hyper-V fixes from Sasha Levin:
      
       - A few fixes for the userspace hyper-v tools from Adrian Vladu.
      
       - A fix for the hyper-v MAINTAINERs entry from Lan Tianyu.
      
       - Fix for SPDX license identifier in the userspace tools from Nishad
         Kamdar.
      
      * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        MAINTAINERS: Fix Hyperv vIOMMU driver file name
        tools: hv: Use the correct style for SPDX License Identifier
        tools: hv: fix typos in toolchain
        tools: hv: fix KVP and VSS daemons exit code
        tools: hv: fixed Python pep8/flake8 warnings for lsvmbus
      85d8d3b1
  2. 17 Aug, 2019 9 commits
  3. 16 Aug, 2019 9 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · b7e7c85d
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Don't taint the kernel if CPUs have different sets of page sizes
         supported (other than the one in use).
      
       - Issue I-cache maintenance for module ftrace trampoline.
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side
        arm64: cpufeature: Don't treat granule sizes as strict
      b7e7c85d
    • Will Deacon's avatar
      arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side · b6143d10
      Will Deacon authored
      The initial support for dynamic ftrace trampolines in modules made use
      of an indirect branch which loaded its target from the beginning of
      a special section (e71a4e1b ("arm64: ftrace: add support for far
      branches to dynamic ftrace")). Since no instructions were being patched,
      no cache maintenance was needed. However, later in be0f272b ("arm64:
      ftrace: emit ftrace-mod.o contents through code") this code was reworked
      to output the trampoline instructions directly into the PLT entry but,
      unfortunately, the necessary cache maintenance was overlooked.
      
      Add a call to __flush_icache_range() after writing the new trampoline
      instructions but before patching in the branch to the trampoline.
      
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: James Morse <james.morse@arm.com>
      Cc: <stable@vger.kernel.org>
      Fixes: be0f272b ("arm64: ftrace: emit ftrace-mod.o contents through code")
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      b6143d10
    • Linus Torvalds's avatar
      Merge tag 'pm-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 2d63ba3e
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These add a check to avoid recent suspend-to-idle power regression on
        systems with NVMe drives where the PCIe ASPM policy is "performance"
        (or when the kernel is built without ASPM support), fix an issue
        related to frequency limits in the schedutil cpufreq governor and fix
        a mistake related to the PM QoS usage in the cpufreq core introduced
        recently.
      
        Specifics:
      
         - Disable NVMe power optimization related to suspend-to-idle added
           recently on systems where PCIe ASPM is not able to put PCIe links
           into low-power states to prevent excess power from being drawn by
           the system while suspended (Rafael Wysocki).
      
         - Make the schedutil governor handle frequency limits changes
           properly in all cases (Viresh Kumar).
      
         - Prevent the cpufreq core from treating positive values returned by
           dev_pm_qos_update_request() as errors (Viresh Kumar)"
      
      * tag 'pm-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        nvme-pci: Allow PCI bus-level PM to be used if ASPM is disabled
        PCI/ASPM: Add pcie_aspm_enabled()
        cpufreq: schedutil: Don't skip freq update when limits change
        cpufreq: dev_pm_qos_update_request() can return 1 on success
      2d63ba3e
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.3-rc5' of git://git.infradead.org/users/vkoul/slave-dma · 9da5bb24
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "Fixes in dmaengine drivers for:
      
         - dw-edma: endianess, _iomem type and stack usages
      
         - ste_dma40: unneeded variable and null-pointer dereference
      
         - tegra210-adma: unused function
      
         - omap-dma: off-by-one fix"
      
      * tag 'dmaengine-fix-5.3-rc5' of git://git.infradead.org/users/vkoul/slave-dma:
        omap-dma/omap_vout_vrfb: fix off-by-one fi value
        dmaengine: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler()
        dmaengine: tegra210-adma: Fix unused function warnings
        dmaengine: ste_dma40: fix unneeded variable warning
        dmaengine: dw-edma: fix endianess confusion
        dmaengine: dw-edma: fix __iomem type confusion
        dmaengine: dw-edma: fix unnecessary stack usage
      9da5bb24
    • Linus Torvalds's avatar
      Merge tag 'sound-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · cfa0bb2a
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "All small fixes targeted for stable:
      
         - Two fixes for USB-audio with malformed descriptor, spotted by
           fuzzers
      
         - Two fixes Conexant HD-audio codec wrt power management
      
         - Quirks for HD-audio AMD platform and HP laptop
      
         - HD-audio memory leak fix"
      
      * tag 'sound-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term
        ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit
        ALSA: hda - Add a generic reboot_notify
        ALSA: hda - Let all conexant codec enter D3 when rebooting
        ALSA: hda/realtek - Add quirk for HP Envy x360
        ALSA: hda - Fix a memory leak bug
        ALSA: hda - Apply workaround for another AMD chip 1022:1487
      cfa0bb2a
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-08-16' of git://anongit.freedesktop.org/drm/drm · ec037ac2
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Nothing too crazy this week, one amdgpu fix to use vmalloc for a
        struct that grew in size, and another MST fix for nouveau, and some
        other misc fixes:
      
        i915:
         - single GVT use after free fix
      
        scheduler:
         - entity destruction race fix
      
        amdgpu:
         - struct allocation fix
         - gfx9 soft recovery fix
      
        nouveau:
         - followup MST fix
      
        ast:
         - vga register race fix"
      
      * tag 'drm-fixes-2019-08-16' of git://anongit.freedesktop.org/drm/drm:
        drm/nouveau: Only recalculate PBN/VCPI on mode/connector changes
        drm/ast: Fixed reboot test may cause system hanged
        drm/scheduler: use job count instead of peek
        drm/amd/display: use kvmalloc for dc_state (v2)
        drm/amdgpu: fix gfx9 soft recovery
        drm/i915: Use after free in error path in intel_vgpu_create_workload()
      ec037ac2
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · a3ee2477
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: schedutil: Don't skip freq update when limits change
        cpufreq: dev_pm_qos_update_request() can return 1 on success
      a3ee2477
    • Greg Kroah-Hartman's avatar
      Merge tag 'soundwire-5.3-rc5' of... · 9cd02b09
      Greg Kroah-Hartman authored
      Merge tag 'soundwire-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-linus
      
      Vinod writes:
      
      soundwire fixes for v5.3-rc5
      
      Pierre sent fixes which are queued now for v5.3-rc5 are:
       - regmap dependecy
       - cadence register definitions
      
      * tag 'soundwire-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
        soundwire: fix regmap dependencies and align with other serial links
        soundwire: cadence_master: fix definitions for INTSTAT0/1
        soundwire: cadence_master: fix register definition for SLAVE_STATE
      9cd02b09
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2019-08-15' of... · a85abd5d
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2019-08-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.4-rc5:
      - GVT use-after-free fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87zhkag9ic.fsf@intel.com
      a85abd5d
  4. 15 Aug, 2019 15 commits
    • Hui Peng's avatar
      ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term · 19bce474
      Hui Peng authored
      `check_input_term` recursively calls itself with input from
      device side (e.g., uac_input_terminal_descriptor.bCSourceID)
      as argument (id). In `check_input_term`, if `check_input_term`
      is called with the same `id` argument as the caller, it triggers
      endless recursive call, resulting kernel space stack overflow.
      
      This patch fixes the bug by adding a bitmap to `struct mixer_build`
      to keep track of the checked ids and stop the execution if some id
      has been checked (similar to how parse_audio_unit handles unitid
      argument).
      Reported-by: default avatarHui Peng <benquike@gmail.com>
      Reported-by: default avatarMathias Payer <mathias.payer@nebelwelt.net>
      Signed-off-by: default avatarHui Peng <benquike@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      19bce474
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.3-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · a69e9051
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
      
       - Fix crashes when the attr fork isn't present due to errors but inode
         inactivation tries to zap the attr data anyway.
      
       - Convert more directory corruption debugging asserts to actual
         EFSCORRUPTED returns instead of blowing up later on.
      
       - Don't fail writeback just because we ran out of memory allocating
         metadata log data.
      
      * tag 'xfs-5.3-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: don't crash on null attr fork xfs_bmapi_read
        xfs: remove more ondisk directory corruption asserts
        fs: xfs: xfs_log: Don't use KM_MAYFAIL at xfs_log_reserve().
      a69e9051
    • Linus Torvalds's avatar
      Merge tag 'iomap-5.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 4ec1fa69
      Linus Torvalds authored
      Pull iomap fixlet from Darrick Wong:
       "A single update to the MAINTAINERS entry for iomap now that we've
        removed fs/iomap.c"
      
      * tag 'iomap-5.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        MAINTAINERS: iomap: Remove fs/iomap.c record
      4ec1fa69
    • Jackie Liu's avatar
      io_uring: fix an issue when IOSQE_IO_LINK is inserted into defer list · a982eeb0
      Jackie Liu authored
      This patch may fix two issues:
      
      First, when IOSQE_IO_DRAIN set, the next IOs need to be inserted into
      defer list to delay execution, but link io will be actively scheduled to
      run by calling io_queue_sqe.
      
      Second, when multiple LINK_IOs are inserted together with defer_list,
      the LINK_IO is no longer keep order.
      
         |-------------|
         |   LINK_IO   |      ----> insert to defer_list  -----------
         |-------------|                                            |
         |   LINK_IO   |      ----> insert to defer_list  ----------|
         |-------------|                                            |
         |   LINK_IO   |      ----> insert to defer_list  ----------|
         |-------------|                                            |
         |   NORMAL_IO |      ----> insert to defer_list  ----------|
         |-------------|                                            |
                                                                    |
                                    queue_work at same time   <-----|
      
      Fixes: 9e645e11 ("io_uring: add support for sqe links")
      Signed-off-by: default avatarJackie Liu <liuyun01@kylinos.cn>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      a982eeb0
    • Jens Axboe's avatar
      block: remove REQ_NOWAIT_INLINE · 7b6620d7
      Jens Axboe authored
      We had a few issues with this code, and there's still a problem around
      how we deal with error handling for chained/split bios. For now, just
      revert the code and we'll try again with a thoroug solution. This
      reverts commits:
      
      e15c2ffa ("block: fix O_DIRECT error handling for bio fragments")
      0eb6ddfb ("block: Fix __blkdev_direct_IO() for bio fragments")
      6a43074e ("block: properly handle IOCB_NOWAIT for async O_DIRECT IO")
      893a1c97 ("blk-mq: allow REQ_NOWAIT to return an error inline")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7b6620d7
    • Aleix Roca Nonell's avatar
      io_uring: fix manual setup of iov_iter for fixed buffers · 99c79f66
      Aleix Roca Nonell authored
      Commit bd11b3a3 ("io_uring: don't use iov_iter_advance() for fixed
      buffers") introduced an optimization to avoid using the slow
      iov_iter_advance by manually populating the iov_iter iterator in some
      cases.
      
      However, the computation of the iterator count field was erroneous: The
      first bvec was always accounted for an extent of page size even if the
      bvec length was smaller.
      
      In consequence, some I/O operations on fixed buffers were unable to
      operate on the full extent of the buffer, consistently skipping some
      bytes at the end of it.
      
      Fixes: bd11b3a3 ("io_uring: don't use iov_iter_advance() for fixed buffers")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAleix Roca Nonell <aleix.rocanonell@bsc.es>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      99c79f66
    • Linus Torvalds's avatar
      Merge tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux · 32912042
      Linus Torvalds authored
      Pull auxdisplay fixes from Miguel Ojeda:
       "A few minor auxdisplay improvements:
      
         - A couple of small header cleanups for charlcd (Masahiro Yamada)
      
         - A trivial typo fix for the examples of cfag12864b (Masahiro Yamada)
      
         - An Kconfig help text improvement for charlcd (Mans Rullgard)
      
         - An error path fix for panel (zhengbin)"
      
      * tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux:
        auxdisplay: Fix a typo in cfag12864b-example.c
        auxdisplay: charlcd: add include guard to charlcd.h
        auxdisplay: charlcd: move charlcd.h to drivers/auxdisplay
        auxdisplay: charlcd: add help text for backlight initial state
        auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach
      32912042
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 2b245b8b
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Fix building DT binding examples for in tree builds
      
       - Correct some refcounting in adjust_local_phandle_references()
      
       - Update FSL FEC binding with deprecated properties
      
       - Schema fix in stm32 pinctrl
      
       - Fix typo in of_irq_parse_one docbook comment
      
      * tag 'devicetree-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: irq: fix a trivial typo in a doc comment
        dt-bindings: pinctrl: stm32: Fix 'st,syscfg' schema
        dt-bindings: fec: explicitly mark deprecated properties
        of: resolver: Add of_node_put() before return and break
        dt-bindings: Fix generated example files getting added to schemas
      2b245b8b
    • Randy Dunlap's avatar
      misc: xilinx-sdfec: fix dependency and build error · 01fd150f
      Randy Dunlap authored
      lib/devres.c, which implements devm_ioremap_resource(), is only built
      when CONFIG_HAS_IOMEM is set/enabled, so XILINX_SDFEC should depend
      on HAS_IOMEM.  Fixes this build error (as seen on UML builds):
      
      ERROR: "devm_ioremap_resource" [drivers/misc/xilinx_sdfec.ko] undefined!
      
      Fixes: 76d83e1c ("misc: xilinx-sdfec: add core driver")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Derek Kiernan <derek.kiernan@xilinx.com>
      Cc: Dragan Cvetic <dragan.cvetic@xilinx.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/f9004be5-9925-327b-3ec2-6506e46fe565@infradead.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01fd150f
    • Christoph Hellwig's avatar
      usb: add a hcd_uses_dma helper · edfbcb32
      Christoph Hellwig authored
      The USB buffer allocation code is the only place in the usb core (and in
      fact the whole kernel) that uses is_device_dma_capable, while the URB
      mapping code uses the uses_dma flag in struct usb_bus.  Switch the buffer
      allocation to use the uses_dma flag used by the rest of the USB code,
      and create a helper in hcd.h that checks this flag as well as the
      CONFIG_HAS_DMA to simplify the caller a bit.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Link: https://lore.kernel.org/r/20190811080520.21712-3-hch@lst.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      edfbcb32
    • Christoph Hellwig's avatar
      usb: don't create dma pools for HCDs with a localmem_pool · dd3ecf17
      Christoph Hellwig authored
      If the HCD provides a localmem pool we will never use the DMA pools, so
      don't create them.
      
      Fixes: b0310c2f ("USB: use genalloc for USB HCs with local memory")
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Link: https://lore.kernel.org/r/20190811080520.21712-2-hch@lst.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dd3ecf17
    • André Draszik's avatar
      usb: chipidea: imx: fix EPROBE_DEFER support during driver probe · 141822aa
      André Draszik authored
      If driver probe needs to be deferred, e.g. because ci_hdrc_add_device()
      isn't ready yet, this driver currently misbehaves badly:
          a) success is still reported to the driver core (meaning a 2nd
             probe attempt will never be done), leaving the driver in
             a dysfunctional state and the hardware unusable
      
          b) driver remove / shutdown OOPSes:
          [  206.786916] Unable to handle kernel paging request at virtual address fffffdff
          [  206.794148] pgd = 880b9f82
          [  206.796890] [fffffdff] *pgd=abf5e861, *pte=00000000, *ppte=00000000
          [  206.803179] Internal error: Oops: 37 [#1] PREEMPT SMP ARM
          [  206.808581] Modules linked in: wl18xx evbug
          [  206.813308] CPU: 1 PID: 1 Comm: systemd-shutdow Not tainted 4.19.35+gf345c93b4195 #1
          [  206.821053] Hardware name: Freescale i.MX7 Dual (Device Tree)
          [  206.826813] PC is at ci_hdrc_remove_device+0x4/0x20
          [  206.831699] LR is at ci_hdrc_imx_remove+0x20/0xe8
          [  206.836407] pc : [<805cd4b0>]    lr : [<805d62cc>]    psr: 20000013
          [  206.842678] sp : a806be40  ip : 00000001  fp : 80adbd3c
          [  206.847906] r10: 80b1b794  r9 : 80d5dfe0  r8 : a8192c44
          [  206.853136] r7 : 80db93a0  r6 : a8192c10  r5 : a8192c00  r4 : a93a4a00
          [  206.859668] r3 : 00000000  r2 : a8192ce4  r1 : ffffffff  r0 : fffffdfb
          [  206.866201] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
          [  206.873341] Control: 10c5387d  Table: a9e0c06a  DAC: 00000051
          [  206.879092] Process systemd-shutdow (pid: 1, stack limit = 0xb271353c)
          [  206.885624] Stack: (0xa806be40 to 0xa806c000)
          [  206.889992] be40: a93a4a00 805d62cc a8192c1c a8170e10 a8192c10 8049a490 80d04d08 00000000
          [  206.898179] be60: 00000000 80d0da2c fee1dead 00000000 a806a000 00000058 00000000 80148b08
          [  206.906366] be80: 01234567 80148d8c a9858600 00000000 00000000 00000000 00000000 80d04d08
          [  206.914553] bea0: 00000000 00000000 a82741e0 a9858600 00000024 00000002 a9858608 00000005
          [  206.922740] bec0: 0000001e 8022c058 00000000 00000000 a806bf14 a9858600 00000000 a806befc
          [  206.930927] bee0: a806bf78 00000000 7ee12c30 8022c18c a806bef8 a806befc 00000000 00000001
          [  206.939115] bf00: 00000000 00000024 a806bf14 00000005 7ee13b34 7ee12c68 00000004 7ee13f20
          [  206.947302] bf20: 00000010 7ee12c7c 00000005 7ee12d04 0000000a 76e7dc00 00000001 80d0f140
          [  206.955490] bf40: ab637880 a974de40 60000013 80d0f140 ab6378a0 80d04d08 a8080470 a9858600
          [  206.963677] bf60: a9858600 00000000 00000000 8022c24c 00000000 80144310 00000000 00000000
          [  206.971864] bf80: 80101204 80d04d08 00000000 80d04d08 00000000 00000000 00000003 00000058
          [  206.980051] bfa0: 80101204 80101000 00000000 00000000 fee1dead 28121969 01234567 00000000
          [  206.988237] bfc0: 00000000 00000000 00000003 00000058 00000000 00000000 00000000 00000000
          [  206.996425] bfe0: 0049ffb0 7ee13d58 0048a84b 76f245a6 60000030 fee1dead 00000000 00000000
          [  207.004622] [<805cd4b0>] (ci_hdrc_remove_device) from [<805d62cc>] (ci_hdrc_imx_remove+0x20/0xe8)
          [  207.013509] [<805d62cc>] (ci_hdrc_imx_remove) from [<8049a490>] (device_shutdown+0x16c/0x218)
          [  207.022050] [<8049a490>] (device_shutdown) from [<80148b08>] (kernel_restart+0xc/0x50)
          [  207.029980] [<80148b08>] (kernel_restart) from [<80148d8c>] (sys_reboot+0xf4/0x1f0)
          [  207.037648] [<80148d8c>] (sys_reboot) from [<80101000>] (ret_fast_syscall+0x0/0x54)
          [  207.045308] Exception stack(0xa806bfa8 to 0xa806bff0)
          [  207.050368] bfa0:                   00000000 00000000 fee1dead 28121969 01234567 00000000
          [  207.058554] bfc0: 00000000 00000000 00000003 00000058 00000000 00000000 00000000 00000000
          [  207.066737] bfe0: 0049ffb0 7ee13d58 0048a84b 76f245a6
          [  207.071799] Code: ebffffa8 e3a00000 e8bd8010 e92d4010 (e5904004)
          [  207.078021] ---[ end trace be47424e3fd46e9f ]---
          [  207.082647] Kernel panic - not syncing: Fatal exception
          [  207.087894] ---[ end Kernel panic - not syncing: Fatal exception ]---
      
          c) the error path in combination with driver removal causes
             imbalanced calls to the clk_*() and pm_()* APIs
      
      a) happens because the original intended return value is
         overwritten (with 0) by the return code of
         regulator_disable() in ci_hdrc_imx_probe()'s error path
      b) happens because ci_pdev is -EPROBE_DEFER, which causes
         ci_hdrc_remove_device() to OOPS
      
      Fix a) by being more careful in ci_hdrc_imx_probe()'s error
      path and not overwriting the real error code
      
      Fix b) by calling the respective cleanup functions during
      remove only when needed (when ci_pdev != NULL, i.e. when
      everything was initialised correctly). This also has the
      side effect of not causing imbalanced clk_*() and pm_*()
      API calls as part of the error code path.
      
      Fixes: 7c8e8909 ("usb: chipidea: imx: add HSIC support")
      Signed-off-by: default avatarAndré Draszik <git@andred.net>
      Cc: stable <stable@vger.kernel.org>
      CC: Peter Chen <Peter.Chen@nxp.com>
      CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      CC: Shawn Guo <shawnguo@kernel.org>
      CC: Sascha Hauer <s.hauer@pengutronix.de>
      CC: Pengutronix Kernel Team <kernel@pengutronix.de>
      CC: Fabio Estevam <festevam@gmail.com>
      CC: NXP Linux Team <linux-imx@nxp.com>
      CC: linux-usb@vger.kernel.org
      CC: linux-arm-kernel@lists.infradead.org
      CC: linux-kernel@vger.kernel.org
      Link: https://lore.kernel.org/r/20190810150758.17694-1-git@andred.netSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      141822aa
    • Hans Ulli Kroll's avatar
      usb: host: fotg2: restart hcd after port reset · 77775888
      Hans Ulli Kroll authored
      On the Gemini SoC the FOTG2 stalls after port reset
      so restart the HCD after each port reset.
      Signed-off-by: default avatarHans Ulli Kroll <ulli.kroll@googlemail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Link: https://lore.kernel.org/r/20190810150458.817-1-linus.walleij@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      77775888
    • Oliver Neukum's avatar
      USB: CDC: fix sanity checks in CDC union parser · 54364278
      Oliver Neukum authored
      A few checks checked for the size of the pointer to a structure
      instead of the structure itself. Copy & paste issue presumably.
      
      Fixes: e4c6fb77 ("usbnet: move the CDC parser into USB core")
      Cc: stable <stable@vger.kernel.org>
      Reported-by: syzbot+45a53506b65321c1fe91@syzkaller.appspotmail.com
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Link: https://lore.kernel.org/r/20190813093541.18889-1-oneukum@suse.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      54364278
    • Oliver Neukum's avatar
      usb: cdc-acm: make sure a refcount is taken early enough · c52873e5
      Oliver Neukum authored
      destroy() will decrement the refcount on the interface, so that
      it needs to be taken so early that it never undercounts.
      
      Fixes: 7fb57a01 ("USB: cdc-acm: Fix potential deadlock (lockdep warning)")
      Cc: stable <stable@vger.kernel.org>
      Reported-and-tested-by: syzbot+1b2449b7b5dc240d107a@syzkaller.appspotmail.com
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Link: https://lore.kernel.org/r/20190808142119.7998-1-oneukum@suse.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c52873e5