1. 20 Feb, 2020 1 commit
    • Kees Cook's avatar
      x86/xen: Distribute switch variables for initialization · 9038ec99
      Kees Cook authored
      Variables declared in a switch statement before any case statements
      cannot be automatically initialized with compiler instrumentation (as
      they are not part of any execution flow). With GCC's proposed automatic
      stack variable initialization feature, this triggers a warning (and they
      don't get initialized). Clang's automatic stack variable initialization
      (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also
      doesn't initialize such variables[1]. Note that these warnings (or silent
      skipping) happen before the dead-store elimination optimization phase,
      so even when the automatic initializations are later elided in favor of
      direct initializations, the warnings remain.
      
      To avoid these problems, move such variables into the "case" where
      they're used or lift them up into the main function body.
      
      arch/x86/xen/enlighten_pv.c: In function ‘xen_write_msr_safe’:
      arch/x86/xen/enlighten_pv.c:904:12: warning: statement will never be executed [-Wswitch-unreachable]
        904 |   unsigned which;
            |            ^~~~~
      
      [1] https://bugs.llvm.org/show_bug.cgi?id=44916Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Link: https://lore.kernel.org/r/20200220062318.69299-1-keescook@chromium.orgReviewed-by: default avatarJuergen Gross <jgross@suse.com>
      [boris: made @which an 'unsigned int']
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      9038ec99
  2. 29 Jan, 2020 5 commits
    • SeongJae Park's avatar
      xen/blkback: Consistently insert one empty line between functions · 8557bbe5
      SeongJae Park authored
      The number of empty lines between functions in the xenbus.c is
      inconsistent.  This trivial style cleanup commit fixes the file to
      consistently place only one empty line.
      Acked-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarSeongJae Park <sjpark@amazon.de>
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      8557bbe5
    • SeongJae Park's avatar
      xen/blkback: Remove unnecessary static variable name prefixes · 823f2091
      SeongJae Park authored
      A few of static variables in blkback have 'xen_blkif_' prefix, though it
      is unnecessary for static variables.  This commit removes such prefixes.
      Reviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarSeongJae Park <sjpark@amazon.de>
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      823f2091
    • SeongJae Park's avatar
      xen/blkback: Squeeze page pools if a memory pressure is detected · cb9369bd
      SeongJae Park authored
      Each `blkif` has a free pages pool for the grant mapping.  The size of
      the pool starts from zero and is increased on demand while processing
      the I/O requests.  If current I/O requests handling is finished or 100
      milliseconds has passed since last I/O requests handling, it checks and
      shrinks the pool to not exceed the size limit, `max_buffer_pages`.
      
      Therefore, host administrators can cause memory pressure in blkback by
      attaching a large number of block devices and inducing I/O.  Such
      problematic situations can be avoided by limiting the maximum number of
      devices that can be attached, but finding the optimal limit is not so
      easy.  Improper set of the limit can results in memory pressure or a
      resource underutilization.  This commit avoids such problematic
      situations by squeezing the pools (returns every free page in the pool
      to the system) for a while (users can set this duration via a module
      parameter) if memory pressure is detected.
      
      Discussions
      ===========
      
      The `blkback`'s original shrinking mechanism returns only pages in the
      pool which are not currently be used by `blkback` to the system.  In
      other words, the pages that are not mapped with granted pages.  Because
      this commit is changing only the shrink limit but still uses the same
      freeing mechanism it does not touch pages which are currently mapping
      grants.
      
      Once memory pressure is detected, this commit keeps the squeezing limit
      for a user-specified time duration.  The duration should be neither too
      long nor too short.  If it is too long, the squeezing incurring overhead
      can reduce the I/O performance.  If it is too short, `blkback` will not
      free enough pages to reduce the memory pressure.  This commit sets the
      value as `10 milliseconds` by default because it is a short time in
      terms of I/O while it is a long time in terms of memory operations.
      Also, as the original shrinking mechanism works for at least every 100
      milliseconds, this could be a somewhat reasonable choice.  I also tested
      other durations (refer to the below section for more details) and
      confirmed that 10 milliseconds is the one that works best with the test.
      That said, the proper duration depends on actual configurations and
      workloads.  That's why this commit allows users to set the duration as a
      module parameter.
      
      Memory Pressure Test
      ====================
      
      To show how this commit fixes the memory pressure situation well, I
      configured a test environment on a xen-running virtualization system.
      On the `blkfront` running guest instances, I attach a large number of
      network-backed volume devices and induce I/O to those.  Meanwhile, I
      measure the number of pages that swapped in (pswpin) and out (pswpout)
      on the `blkback` running guest.  The test ran twice, once for the
      `blkback` before this commit and once for that after this commit.  As
      shown below, this commit has dramatically reduced the memory pressure:
      
                      pswpin  pswpout
          before      76,672  185,799
          after          867    3,967
      
      Optimal Aggressive Shrinking Duration
      -------------------------------------
      
      To find a best squeezing duration, I repeated the test with three
      different durations (1ms, 10ms, and 100ms).  The results are as below:
      
          duration    pswpin  pswpout
          1           707     5,095
          10          867     3,967
          100         362     3,348
      
      As expected, the memory pressure decreases as the duration increases,
      but the reduction become slow from the `10ms`.  Based on this results, I
      chose the default duration as 10ms.
      
      Performance Overhead Test
      =========================
      
      This commit could incur I/O performance degradation under severe memory
      pressure because the squeezing will require more page allocations per
      I/O.  To show the overhead, I artificially made a worst-case squeezing
      situation and measured the I/O performance of a `blkfront` running
      guest.
      
      For the artificial squeezing, I set the `blkback.max_buffer_pages` using
      the `/sys/module/xen_blkback/parameters/max_buffer_pages` file.  In this
      test, I set the value to `1024` and `0`.  The `1024` is the default
      value.  Setting the value as `0` is same to a situation doing the
      squeezing always (worst-case).
      
      If the underlying block device is slow enough, the squeezing overhead
      could be hidden.  For the reason, I use a fast block device, namely the
      rbd[1]:
      
          # xl block-attach guest phy:/dev/ram0 xvdb w
      
      For the I/O performance measurement, I run a simple `dd` command 5 times
      directly to the device as below and collect the 'MB/s' results.
      
          $ for i in {1..5}; do dd if=/dev/zero of=/dev/xvdb \
                                   bs=4k count=$((256*512)); sync; done
      
      The results are as below.  'max_pgs' represents the value of the
      `blkback.max_buffer_pages` parameter.
      
          max_pgs   Min       Max       Median     Avg    Stddev
          0         417       423       420        419.4  2.5099801
          1024      414       425       416        417.8  4.4384682
          No difference proven at 95.0% confidence
      
      In short, even worst case squeezing on ramdisk based fast block device
      makes no visible performance degradation.  Please note that this is just
      a very simple and minimal test.  On systems using super-fast block
      devices and a special I/O workload, the results might be different.  If
      you have any doubt, test on your machine with your workload to find the
      optimal squeezing duration for you.
      
      [1] https://www.kernel.org/doc/html/latest/admin-guide/blockdev/ramdisk.htmlReviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarSeongJae Park <sjpark@amazon.de>
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      cb9369bd
    • SeongJae Park's avatar
      xenbus/backend: Protect xenbus callback with lock · 060eabe8
      SeongJae Park authored
      A driver's 'reclaim_memory' callback can race with 'probe' or 'remove'
      because it will be called whenever memory pressure is detected.  To
      avoid such race, this commit embeds a spinlock in each 'xenbus_device'
      and make 'xenbus' to hold the lock while the corresponded callbacks are
      running.
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarSeongJae Park <sjpark@amazon.de>
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      060eabe8
    • SeongJae Park's avatar
      xenbus/backend: Add memory pressure handler callback · 8a105678
      SeongJae Park authored
      Granting pages consumes backend system memory.  In systems configured
      with insufficient spare memory for those pages, it can cause a memory
      pressure situation.  However, finding the optimal amount of the spare
      memory is challenging for large systems having dynamic resource
      utilization patterns.  Also, such a static configuration might lack
      flexibility.
      
      To mitigate such problems, this commit adds a memory reclaim callback to
      'xenbus_driver'.  If a memory pressure is detected, 'xenbus' requests
      every backend driver to volunarily release its memory.
      
      Note that it would be able to improve the callback facility for more
      sophisticated handlings of general pressures.  For example, it would be
      possible to monitor the memory consumption of each device and issue the
      release requests to only devices which causing the pressure.  Also, the
      callback could be extended to handle not only memory, but general
      resources.  Nevertheless, this version of the implementation defers such
      sophisticated goals as a future work.
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarSeongJae Park <sjpark@amazon.de>
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      8a105678
  3. 28 Jan, 2020 1 commit
  4. 22 Jan, 2020 1 commit
    • Juergen Gross's avatar
      xen/balloon: Support xend-based toolstack take two · eda4eabf
      Juergen Gross authored
      Commit 3aa6c19d ("xen/balloon: Support xend-based toolstack")
      tried to fix a regression with running on rather ancient Xen versions.
      Unfortunately the fix was based on the assumption that xend would
      just use another Xenstore node, but in reality only some downstream
      versions of xend are doing that. The upstream xend does not write
      that Xenstore node at all, so the problem must be fixed in another
      way.
      
      The easiest way to achieve that is to fall back to the behavior
      before commit 96edd61d ("xen/balloon: don't online new memory
      initially") in case the static memory maximum can't be read.
      
      This is achieved by setting static_max to the current number of
      memory pages known by the system resulting in target_diff becoming
      zero.
      
      Fixes: 3aa6c19d ("xen/balloon: Support xend-based toolstack")
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: <stable@vger.kernel.org> # 4.13
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      eda4eabf
  5. 15 Jan, 2020 1 commit
    • Marek Marczykowski-Górecki's avatar
      xen-pciback: optionally allow interrupt enable flag writes · 476878e4
      Marek Marczykowski-Górecki authored
      QEMU running in a stubdom needs to be able to set INTX_DISABLE, and the
      MSI(-X) enable flags in the PCI config space. This adds an attribute
      'allow_interrupt_control' which when set for a PCI device allows writes
      to this flag(s). The toolstack will need to set this for stubdoms.
      When enabled, guest (stubdomain) will be allowed to set relevant enable
      flags, but only one at a time - i.e. it refuses to enable more than one
      of INTx, MSI, MSI-X at a time.
      
      This functionality is needed only for config space access done by device
      model (stubdomain) serving a HVM with the actual PCI device. It is not
      necessary and unsafe to enable direct access to those bits for PV domain
      with the device attached. For PV domains, there are separate protocol
      messages (XEN_PCI_OP_{enable,disable}_{msi,msix}) for this purpose.
      Those ops in addition to setting enable bits, also configure MSI(-X) in
      dom0 kernel - which is undesirable for PCI passthrough to HVM guests.
      
      This should not introduce any new security issues since a malicious
      guest (or stubdom) can already generate MSIs through other ways, see
      [1] page 8. Additionally, when qemu runs in dom0, it already have direct
      access to those bits.
      
      This is the second iteration of this feature. First was proposed as a
      direct Xen interface through a new hypercall, but ultimately it was
      rejected by the maintainer, because of mixing pciback and hypercalls for
      PCI config space access isn't a good design. Full discussion at [2].
      
      [1]: https://invisiblethingslab.com/resources/2011/Software%20Attacks%20on%20Intel%20VT-d.pdf
      [2]: https://xen.markmail.org/thread/smpgpws4umdzizze
      
      [part of the commit message and sysfs handling]
      Signed-off-by: default avatarSimon Gaiser <simon@invisiblethingslab.com>
      [the rest]
      Signed-off-by: default avatarMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
      Reviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      [boris: A few small changes suggested by Roger, some formatting changes]
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      476878e4
  6. 13 Jan, 2020 2 commits
  7. 12 Jan, 2020 3 commits
  8. 11 Jan, 2020 2 commits
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 6327edce
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Two driver bugfixes, a documentation fix, and a removal of a spec
        violation for the bus recovery algorithm in the core"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: fix bus recovery stop mode timing
        i2c: bcm2835: Store pointer to bus clock
        dt-bindings: i2c: at91: fix i2c-sda-hold-time-ns documentation for sam9x60
        i2c: at91: fix clk_offset for sam9x60
      6327edce
    • Linus Torvalds's avatar
      Merge tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · 606e9ad2
      Linus Torvalds authored
      Pull thread fixes from Christian Brauner:
       "This contains a series of patches to fix CLONE_SETTLS when used with
        clone3().
      
        The clone3() syscall passes the tls argument through struct clone_args
        instead of a register. This means, all architectures that do not
        implement copy_thread_tls() but still support CLONE_SETTLS via
        copy_thread() expecting the tls to be located in a register argument
        based on clone() are currently unfortunately broken. Their tls value
        will be garbage.
      
        The patch series fixes this on all architectures that currently define
        __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure
        that any architecture that enables clone3() in the future is forced to
        also implement copy_thread_tls().
      
        My ultimate goal is to get rid of the copy_thread()/copy_thread_tls()
        split and just have copy_thread_tls() at some point in the not too
        distant future (Maybe even renaming copy_thread_tls() back to simply
        copy_thread() once the old function is ripped from all arches). This
        is dependent now on all arches supporting clone3().
      
        While all relevant arches do that now there are still four missing:
        ia64, m68k, sh and sparc. They have the system call reserved, but not
        implemented. Once they all implement clone3() we can get rid of
        ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS.
      
        This series also includes a minor fix for the arm64 uapi headers which
        caused __NR_clone3 to be missing from the exported user headers.
      
        Unfortunately the series came in a little late especially given that
        it touches a range of architectures. Due to the holidays not all arch
        maintainers responded in time probably due to their backlog. Will and
        Arnd have thankfully acked the arm specific changes.
      
        Given that the changes are straightforward and rather minimal combined
        with the fact the that clone3() with CLONE_SETTLS is broken I decided
        to send them post rc3 nonetheless"
      
      * tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        um: Implement copy_thread_tls
        clone3: ensure copy_thread_tls is implemented
        xtensa: Implement copy_thread_tls
        riscv: Implement copy_thread_tls
        parisc: Implement copy_thread_tls
        arm: Implement copy_thread_tls
        arm64: Implement copy_thread_tls
        arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers
      606e9ad2
  9. 10 Jan, 2020 19 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · ac61145a
      Linus Torvalds authored
      Pull HID fix from Jiri Kosina:
       "A regression fix for EPOLLOUT handling in hidraw and uhid"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: hidraw, uhid: Always report EPOLLOUT
      ac61145a
    • Linus Torvalds's avatar
      Merge tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 213356fe
      Linus Torvalds authored
      Pull USB/PHY fixes from Greg KH:
       "Here are a number of USB and PHY driver fixes for 5.5-rc6
      
        Nothing all that unusual, just the a bunch of small fixes for a lot of
        different reported issues. The PHY driver fixes are in here as they
        interacted with the usb drivers.
      
        Full details of the patches are in the shortlog, and all of these have
        been in linux-next with no reported issues"
      
      * tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits)
        usb: missing parentheses in USE_NEW_SCHEME
        usb: ohci-da8xx: ensure error return on variable error is set
        usb: musb: Disable pullup at init
        usb: musb: fix idling for suspend after disconnect interrupt
        usb: typec: ucsi: Fix the notification bit offsets
        USB: Fix: Don't skip endpoint descriptors with maxpacket=0
        USB-PD tcpm: bad warning+size, PPS adapters
        phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz
        usb: chipidea: host: Disable port power only if previously enabled
        usb: cdns3: should not use the same dev_id for shared interrupt handler
        usb: dwc3: gadget: Fix request complete check
        usb: musb: dma: Correct parameter passed to IRQ handler
        usb: musb: jz4740: Silence error if code is -EPROBE_DEFER
        usb: udc: tegra: select USB_ROLE_SWITCH
        USB: core: fix check for duplicate endpoints
        phy: cpcap-usb: Drop extra write to usb2 register
        phy: cpcap-usb: Improve host vs docked mode detection
        phy: cpcap-usb: Prevent USB line glitches from waking up modem
        phy: mapphone-mdm6600: Fix uninitialized status value regression
        phy: cpcap-usb: Fix flakey host idling and enumerating of devices
        ...
      213356fe
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 9fb7007d
      Linus Torvalds authored
      Pull char/misc fix from Greg KH:
       "Here is a single fix, for the chrdev core, for 5.5-rc6
      
        There's been a long-standing race condition triggered by syzbot, and
        occasionally real people, in the chrdev open() path. Will finally took
        the time to track it down and fix it for real before the holidays.
      
        Here's that one patch, it's been in linux-next for a while with no
        reported issues and it does fix the reported problem"
      
      * tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        chardev: Avoid potential use-after-free in 'chrdev_open()'
      9fb7007d
    • Linus Torvalds's avatar
      Merge tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 7da37cd0
      Linus Torvalds authored
      Pull staging fixes from Greg KH:
       "Here are some small staging driver fixes for 5.5-rc6.
      
        Nothing major here, just some small fixes for a comedi driver, the
        vt6656 driver, and a new device id for the rtl8188eu driver.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21
        staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713
        staging: vt6656: set usb_set_intfdata on driver fail.
        staging: vt6656: remove bool from vnt_radio_power_on ret
        staging: vt6656: limit reg output to block size
        staging: vt6656: correct return of vnt_init_registers.
        staging: vt6656: Fix non zero logical return of, usb_control_msg
      7da37cd0
    • Linus Torvalds's avatar
      Merge tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 5a96c0bb
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are two tty/serial driver fixes for 5.5-rc6.
      
        The first fixes a much much reported issue with a previous tty port
        link patch that is in your tree, and the second fixes a problem where
        the serdev driver would claim ACPI devices that it shouldn't be
        claiming.
      
        Both have been in linux-next for a while with no reported issues"
      
      * tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serdev: Don't claim unsupported ACPI serial devices
        tty: always relink the port
      5a96c0bb
    • Linus Torvalds's avatar
      Merge tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block · 4e4cd21c
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes that should go into this round.
      
        This pull request contains two NVMe fixes via Keith, removal of a dead
        function, and a fix for the bio op for read truncates (Ming)"
      
      * tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block:
        nvmet: fix per feat data len for get_feature
        nvme: Translate more status codes to blk_status_t
        fs: move guard_bio_eod() after bio_set_op_attrs
        block: remove unused mp_bvec_last_segment
      4e4cd21c
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block · 30b6487d
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "Single fix for this series, fixing a regression with the short read
        handling.
      
        This just removes it, as it cannot safely be done for all cases"
      
      * tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block:
        io_uring: remove punt of short reads to async context
      30b6487d
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 4936ce17
      Linus Torvalds authored
      Pull MTD fixes from Miquel Raynal:
       "MTD:
         - sm_ftl: Fix NULL pointer warning.
      
        Raw NAND:
         - Cadence: fix compile testing.
         - STM32: Avoid locking.
      
        Onenand:
         - Fix several sparse/build warnings.
      
        SPI-NOR:
         - Add a flag to fix interaction with Micron parts"
      
      * tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: spi-nor: Fix the writing of the Status Register on micron flashes
        mtd: sm_ftl: fix NULL pointer warning
        mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy
        mtd: onenand: samsung: Fix iomem access with regular memcpy
        mtd: onenand: omap2: Fix errors in style
        mtd: cadence: Fix cast to pointer from integer of different size warning
        mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus
      4936ce17
    • Linus Torvalds's avatar
      Merge tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b1d198c0
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A few piled ASoC fixes and usual HD-audio and USB-audio fixups. Some
        of them are for ASoC core error-handling"
      
      * tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda: enable regmap internal locking
        ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen
        ALSA: hda/realtek - Set EAPD control to default for ALC222
        ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
        ALSA: hda/realtek - Add new codec supported for ALCS1200A
        ASoC: Intel: boards: Fix compile-testing RT1011/RT5682
        ASoC: SOF: imx8: Fix dsp_box offset
        ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime()
        ASoC: fsl_audmix: add missed pm_runtime_disable
        ASoC: stm32: spdifrx: fix input pin state management
        ASoC: stm32: spdifrx: fix race condition in irq handler
        ASoC: stm32: spdifrx: fix inconsistent lock state
        ASoC: core: Fix access to uninitialized list heads
        ASoC: soc-core: Set dpcm_playback / dpcm_capture
        ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev
        ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free
        ASoC: SOF: fix fault at driver unload after failed probe
      b1d198c0
    • Linus Torvalds's avatar
      Merge tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · 658e1af5
      Linus Torvalds authored
      Pull thermal fix from Daniel Lezcano:
       "Fix backward compatibility with old DTBs on QCOM tsens (Amit
        Kucheria)"
      
      * tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
        drivers: thermal: tsens: Work with old DTBs
      658e1af5
    • Linus Torvalds's avatar
      Merge tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c23e744b
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "Prevent the cpufreq-dt driver from probing Tegra20/30 (Dmitry
        Osipenko) and prevent the Intel RAPL power capping driver from
        crashing during CPU initialization due to a NULL pointer dereference
        if the processor model in use is not known to it (Harry Pan)"
      
      * tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online()
        cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs
      c23e744b
    • Amit Engel's avatar
      nvmet: fix per feat data len for get_feature · e17016f6
      Amit Engel authored
      The existing implementation for the get_feature admin-cmd does not
      use per-feature data len. This patch introduces a new helper function
      nvmet_feat_data_len(), which is used to calculate per feature data len.
      Right now we only set data len for fid 0x81 (NVME_FEAT_HOST_ID).
      
      Fixes: commit e9061c39 ("nvmet: Remove the data_len field from the nvmet_req struct")
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAmit Engel <amit.engel@dell.com>
      [endiness, naming, and kernel style fixes]
      Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      e17016f6
    • Keith Busch's avatar
      nvme: Translate more status codes to blk_status_t · 35038bff
      Keith Busch authored
      Decode interrupted command and not ready namespace nvme status codes to
      BLK_STS_TARGET. These are not generic IO errors and should use a non-path
      specific error so that it can use the non-failover retry path.
      Reported-by: default avatarJohn Meneghini <John.Meneghini@netapp.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      35038bff
    • Jiri Kosina's avatar
      HID: hidraw, uhid: Always report EPOLLOUT · 9e635c28
      Jiri Kosina authored
      hidraw and uhid device nodes are always available for writing so we should
      always report EPOLLOUT and EPOLLWRNORM bits, not only in the cases when
      there is nothing to read.
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Fixes: be54e746 ("HID: uhid: Fix returning EPOLLOUT from uhid_char_poll")
      Fixes: 9f3b61dc ("HID: hidraw: Fix returning EPOLLOUT from hidraw_poll")
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      9e635c28
    • Rafael J. Wysocki's avatar
      Merge branch 'powercap' · 10674d97
      Rafael J. Wysocki authored
      * powercap:
        powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online()
      10674d97
    • Linus Torvalds's avatar
      Merge tag 'pstore-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · bef1d882
      Linus Torvalds authored
      Pull pstore fix from Kees Cook:
       "Cengiz Can forwarded a Coverity report about more problems with a rare
        pstore initialization error path, so the allocation lifetime was
        rearranged to avoid needing to share the kfree() responsibilities
        between caller and callee"
      
      * tag 'pstore-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        pstore/ram: Regularize prz label allocation lifetime
      bef1d882
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-01-10' of git://anongit.freedesktop.org/drm/drm · 6d25ef77
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Pre-LCA pull request I'm not sure how things will look next week,
        myself and Daniel are at LCA and I'm speaking quite late, so if I get
        my talk finished I'll probably process fixes.
      
        This week has a bunch of i915 fixes, some amdgpu fixes, one sun4i, one
        core MST, and one core fb_helper fix. More details below:
      
        core:
         - mst Fix NO_STOP_BIT bit offset (Wayne)
      
        fb_helper:
         - fb_helper: Fix bits_per_pixel param set behavior to round up
           (Geert)
      
        sun4i:
         - Fix RGB_DIV clock min divider on old hardware (Chen-Yu)
      
        amdgpu:
         - Stability fix for raven
         - Reduce pixel encoding to if max clock is exceeded on HDMI to allow
           additional high res modes
         - enable DRIVER_SYNCOBJ_TIMELINE for amdgpu
      
        i915:
         - Fix GitLab issue #446 causing GPU hangs: Do not restore invalid RS
           state
         - Fix GitLab issue #846: Restore coarse power gating that was
           disabled by initial RC66 context corruption security fixes.
         - Revert f6ec9483 ("drm/i915: extend audio CDCLK>=2*BCLK
           constraint to more platforms") to avoid screen flicker
         - Fix to fill in unitialized uabi_instance in virtual engine uAPI
         - Add two missing W/As for ICL and EHL"
      
      * tag 'drm-fixes-2020-01-10' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: add DRIVER_SYNCOBJ_TIMELINE to amdgpu
        drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded
        Revert "drm/amdgpu: Set no-retry as default."
        drm/fb-helper: Round up bits_per_pixel if possible
        drm/sun4i: tcon: Set RGB DCLK min. divider based on hardware model
        drm/i915/dp: Disable Port sync mode correctly on teardown
        drm/i915: Add Wa_1407352427:icl,ehl
        drm/i915: Add Wa_1408615072 and Wa_1407596294 to icl,ehl
        drm/i915/gt: Restore coarse power gating
        drm/i915/gt: Do not restore invalid RS state
        drm/i915: Limit audio CDCLK>=2*BCLK constraint back to GLK only
        drm/i915/gt: Mark up virtual engine uabi_instance
        drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ
      6d25ef77
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 5e7c1b75
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "First RDMA subsystem updates for 5.5-rc. A very small set of fixes,
        most people seem to still be recovering from December!
      
        Five small driver fixes:
      
         - Fix error flow with MR allocation in bnxt_re
      
         - An errata work around for bnxt_re
      
         - Misuse of the workqueue API in hfi1
      
         - Protocol error in hfi1
      
         - Regression in 5.5 related to the mmap rework with i40iw"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        i40iw: Remove setting of VMA private data and use rdma_user_mmap_io
        IB/hfi1: Adjust flow PSN with the correct resync_psn
        IB/hfi1: Don't cancel unused work item
        RDMA/bnxt_re: Fix Send Work Entry state check while polling completions
        RDMA/bnxt_re: Avoid freeing MR resources if dereg fails
      5e7c1b75
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2020-01-09-1' of... · 023b3b0e
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2020-01-09-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Fix GitLab issue #446 causing GPU hangs: Do not restore invalid RS state
      - Fix GitLab issue #846: Restore coarse power gating that was disabled
        by initial RC66 context corruption security fixes.
      - Revert f6ec9483 ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms")
        to avoid screen flicker
      - Fix to fill in unitialized uabi_instance in virtual engine uAPI
      - Add two missing W/As for ICL and EHL
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200109133458.GA15558@jlahtine-desk.ger.corp.intel.com
      023b3b0e
  10. 09 Jan, 2020 5 commits