1. 18 Jul, 2019 7 commits
    • Dan Williams's avatar
      driver-core, libnvdimm: Let device subsystems add local lockdep coverage · 87a30e1f
      Dan Williams authored
      For good reason, the standard device_lock() is marked
      lockdep_set_novalidate_class() because there is simply no sane way to
      describe the myriad ways the device_lock() ordered with other locks.
      However, that leaves subsystems that know their own local device_lock()
      ordering rules to find lock ordering mistakes manually. Instead,
      introduce an optional / additional lockdep-enabled lock that a subsystem
      can acquire in all the same paths that the device_lock() is acquired.
      
      A conversion of the NFIT driver and NVDIMM subsystem to a
      lockdep-validate device_lock() scheme is included. The
      debug_nvdimm_lock() implementation implements the correct lock-class and
      stacking order for the libnvdimm device topology hierarchy.
      
      Yes, this is a hack, but hopefully it is a useful hack for other
      subsystems device_lock() debug sessions. Quoting Greg:
      
          "Yeah, it feels a bit hacky but it's really up to a subsystem to mess up
           using it as much as anything else, so user beware :)
      
           I don't object to it if it makes things easier for you to debug."
      
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Link: https://lore.kernel.org/r/156341210661.292348.7014034644265455704.stgit@dwillia2-desk3.amr.corp.intel.com
      87a30e1f
    • Dan Williams's avatar
      libnvdimm/bus: Fix wait_nvdimm_bus_probe_idle() ABBA deadlock · ca6bf264
      Dan Williams authored
      A multithreaded namespace creation/destruction stress test currently
      deadlocks with the following lockup signature:
      
          INFO: task ndctl:2924 blocked for more than 122 seconds.
                Tainted: G           OE     5.2.0-rc4+ #3382
          "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
          ndctl           D    0  2924   1176 0x00000000
          Call Trace:
           ? __schedule+0x27e/0x780
           schedule+0x30/0xb0
           wait_nvdimm_bus_probe_idle+0x8a/0xd0 [libnvdimm]
           ? finish_wait+0x80/0x80
           uuid_store+0xe6/0x2e0 [libnvdimm]
           kernfs_fop_write+0xf0/0x1a0
           vfs_write+0xb7/0x1b0
           ksys_write+0x5c/0xd0
           do_syscall_64+0x60/0x240
      
           INFO: task ndctl:2923 blocked for more than 122 seconds.
                 Tainted: G           OE     5.2.0-rc4+ #3382
           "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
           ndctl           D    0  2923   1175 0x00000000
           Call Trace:
            ? __schedule+0x27e/0x780
            ? __mutex_lock+0x489/0x910
            schedule+0x30/0xb0
            schedule_preempt_disabled+0x11/0x20
            __mutex_lock+0x48e/0x910
            ? nvdimm_namespace_common_probe+0x95/0x4d0 [libnvdimm]
            ? __lock_acquire+0x23f/0x1710
            ? nvdimm_namespace_common_probe+0x95/0x4d0 [libnvdimm]
            nvdimm_namespace_common_probe+0x95/0x4d0 [libnvdimm]
            __dax_pmem_probe+0x5e/0x210 [dax_pmem_core]
            ? nvdimm_bus_probe+0x1d0/0x2c0 [libnvdimm]
            dax_pmem_probe+0xc/0x20 [dax_pmem]
            nvdimm_bus_probe+0x90/0x2c0 [libnvdimm]
            really_probe+0xef/0x390
            driver_probe_device+0xb4/0x100
      
      In this sequence an 'nd_dax' device is being probed and trying to take
      the lock on its backing namespace to validate that the 'nd_dax' device
      indeed has exclusive access to the backing namespace. Meanwhile, another
      thread is trying to update the uuid property of that same backing
      namespace. So one thread is in the probe path trying to acquire the
      lock, and the other thread has acquired the lock and tries to flush the
      probe path.
      
      Fix this deadlock by not holding the namespace device_lock over the
      wait_nvdimm_bus_probe_idle() synchronization step. In turn this requires
      the device_lock to be held on entry to wait_nvdimm_bus_probe_idle() and
      subsequently dropped internally to wait_nvdimm_bus_probe_idle().
      
      Cc: <stable@vger.kernel.org>
      Fixes: bf9bccc1 ("libnvdimm: pmem label sets and namespace instantiation")
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Tested-by: default avatarJane Chu <jane.chu@oracle.com>
      Link: https://lore.kernel.org/r/156341210094.292348.2384694131126767789.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      ca6bf264
    • Dan Williams's avatar
      libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl() · b70d31d0
      Dan Williams authored
      In preparation for fixing a deadlock between wait_for_bus_probe_idle()
      and the nvdimm_bus_list_mutex arrange for __nd_ioctl() without
      nvdimm_bus_list_mutex held. This also unifies the 'dimm' and 'bus' level
      ioctls into a common nd_ioctl() preamble implementation.
      
      Marked for -stable as it is a pre-requisite for a follow-on fix.
      
      Cc: <stable@vger.kernel.org>
      Fixes: bf9bccc1 ("libnvdimm: pmem label sets and namespace instantiation")
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Tested-by: default avatarJane Chu <jane.chu@oracle.com>
      Link: https://lore.kernel.org/r/156341209518.292348.7183897251740665198.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      b70d31d0
    • Dan Williams's avatar
      libnvdimm/bus: Prepare the nd_ioctl() path to be re-entrant · 6de5d06e
      Dan Williams authored
      In preparation for not holding a lock over the execution of nd_ioctl(),
      update the implementation to allow multiple threads to be attempting
      ioctls at the same time. The bus lock still prevents multiple in-flight
      ->ndctl() invocations from corrupting each other's state, but static
      global staging buffers are moved to the heap.
      Reported-by: default avatarVishal Verma <vishal.l.verma@intel.com>
      Reviewed-by: default avatarVishal Verma <vishal.l.verma@intel.com>
      Tested-by: default avatarVishal Verma <vishal.l.verma@intel.com>
      Link: https://lore.kernel.org/r/156341208947.292348.10560140326807607481.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      6de5d06e
    • Dan Williams's avatar
      libnvdimm/region: Register badblocks before namespaces · 700cd033
      Dan Williams authored
      Namespace activation expects to be able to reference region badblocks.
      The following warning sometimes triggers when asynchronous namespace
      activation races in front of the completion of namespace probing. Move
      all possible namespace probing after region badblocks initialization.
      
      Otherwise, lockdep sometimes catches the uninitialized state of the
      badblocks seqlock with stack trace signatures like:
      
          INFO: trying to register non-static key.
          pmem2: detected capacity change from 0 to 136365211648
          the code is fine but needs lockdep annotation.
          turning off the locking correctness validator.
          CPU: 9 PID: 358 Comm: kworker/u80:5 Tainted: G           OE     5.2.0-rc4+ #3382
          Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
          Workqueue: events_unbound async_run_entry_fn
          Call Trace:
           dump_stack+0x85/0xc0
          pmem1.12: detected capacity change from 0 to 8589934592
           register_lock_class+0x56a/0x570
           ? check_object+0x140/0x270
           __lock_acquire+0x80/0x1710
           ? __mutex_lock+0x39d/0x910
           lock_acquire+0x9e/0x180
           ? nd_pfn_validate+0x28f/0x440 [libnvdimm]
           badblocks_check+0x93/0x1f0
           ? nd_pfn_validate+0x28f/0x440 [libnvdimm]
           nd_pfn_validate+0x28f/0x440 [libnvdimm]
           ? lockdep_hardirqs_on+0xf0/0x180
           nd_dax_probe+0x9a/0x120 [libnvdimm]
           nd_pmem_probe+0x6d/0x180 [nd_pmem]
           nvdimm_bus_probe+0x90/0x2c0 [libnvdimm]
      
      Fixes: 48af2f7e ("libnvdimm, pfn: during init, clear errors...")
      Cc: <stable@vger.kernel.org>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Reviewed-by: default avatarVishal Verma <vishal.l.verma@intel.com>
      Link: https://lore.kernel.org/r/156341208365.292348.1547528796026249120.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      700cd033
    • Dan Williams's avatar
      libnvdimm/bus: Prevent duplicate device_unregister() calls · 8aac0e23
      Dan Williams authored
      A multithreaded namespace creation/destruction stress test currently
      fails with signatures like the following:
      
          sysfs group 'power' not found for kobject 'dax1.1'
          RIP: 0010:sysfs_remove_group+0x76/0x80
          Call Trace:
           device_del+0x73/0x370
           device_unregister+0x16/0x50
           nd_async_device_unregister+0x1e/0x30 [libnvdimm]
           async_run_entry_fn+0x39/0x160
           process_one_work+0x23c/0x5e0
           worker_thread+0x3c/0x390
      
          BUG: kernel NULL pointer dereference, address: 0000000000000020
          RIP: 0010:klist_put+0x1b/0x6c
          Call Trace:
           klist_del+0xe/0x10
           device_del+0x8a/0x2c9
           ? __switch_to_asm+0x34/0x70
           ? __switch_to_asm+0x40/0x70
           device_unregister+0x44/0x4f
           nd_async_device_unregister+0x22/0x2d [libnvdimm]
           async_run_entry_fn+0x47/0x15a
           process_one_work+0x1a2/0x2eb
           worker_thread+0x1b8/0x26e
      
      Use the kill_device() helper to atomically resolve the race of multiple
      threads issuing kill, device_unregister(), requests.
      Reported-by: default avatarJane Chu <jane.chu@oracle.com>
      Reported-by: default avatarErwin Tsaur <erwin.tsaur@oracle.com>
      Fixes: 4d88a97a ("libnvdimm, nvdimm: dimm driver and base libnvdimm device-driver...")
      Cc: <stable@vger.kernel.org>
      Link: https://github.com/pmem/ndctl/issues/96Tested-by: default avatarTested-by: Jane Chu <jane.chu@oracle.com>
      Link: https://lore.kernel.org/r/156341207846.292348.10435719262819764054.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      8aac0e23
    • Dan Williams's avatar
      drivers/base: Introduce kill_device() · 00289cd8
      Dan Williams authored
      The libnvdimm subsystem arranges for devices to be destroyed as a result
      of a sysfs operation. Since device_unregister() cannot be called from
      an actively running sysfs attribute of the same device libnvdimm
      arranges for device_unregister() to be performed in an out-of-line async
      context.
      
      The driver core maintains a 'dead' state for coordinating its own racing
      async registration / de-registration requests. Rather than add local
      'dead' state tracking infrastructure to libnvdimm device objects, export
      the existing state tracking via a new kill_device() helper.
      
      The kill_device() helper simply marks the device as dead, i.e. that it
      is on its way to device_del(), or returns that the device was already
      dead. This can be used in advance of calling device_unregister() for
      subsystems like libnvdimm that might need to handle multiple user
      threads racing to delete a device.
      
      This refactoring does not change any behavior, but it is a pre-requisite
      for follow-on fixes and therefore marked for -stable.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Fixes: 4d88a97a ("libnvdimm, nvdimm: dimm driver and base libnvdimm device-driver...")
      Cc: <stable@vger.kernel.org>
      Tested-by: default avatarJane Chu <jane.chu@oracle.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Link: https://lore.kernel.org/r/156341207332.292348.14959761496009347574.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      00289cd8
  2. 09 Jun, 2019 1 commit
  3. 08 Jun, 2019 12 commits
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.2-rc4' of git://github.com/ceph/ceph-client · 2759e05c
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "A change to call iput() asynchronously to avoid a possible deadlock
        when iput_final() needs to wait for in-flight I/O (e.g. readahead) and
        a fixup for a cleanup that went into -rc1"
      
      * tag 'ceph-for-5.2-rc4' of git://github.com/ceph/ceph-client:
        ceph: fix error handling in ceph_get_caps()
        ceph: avoid iput_final() while holding mutex or in dispatch thread
        ceph: single workqueue for inode related works
      2759e05c
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.2b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 8e61f6f7
      Linus Torvalds authored
      Pull xen fix from Juergen Gross:
       "Just one fix for the Xen block frontend driver avoiding allocations
        with order > 0"
      
      * tag 'for-linus-5.2b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen-blkfront: switch kcalloc to kvcalloc for large array allocation
      8e61f6f7
    • Linus Torvalds's avatar
      Merge tag 's390-5.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 3d4645bf
      Linus Torvalds authored
      Pull s390 fixes from Heiko Carstens:
      
       - fix stack unwinder: the stack unwinder rework has on off-by-one bug
         which prevents following stack backchains over more than one context
         (e.g. irq -> process).
      
       - fix address space detection in exception handler: if user space
         switches to access register mode, which is not supported anymore, the
         exception handler may resolve to the wrong address space.
      
      * tag 's390-5.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/unwind: correct stack switching during unwind
        s390/mm: fix address space detection in exception handling
      3d4645bf
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_5.2_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · d0cc617a
      Linus Torvalds authored
      Pull MIPS fixes from Paul Burton:
      
       - Declare ginvt() __always_inline due to its use of an argument as an
         inline asm immediate.
      
       - A VDSO build fix following Kbuild changes made this cycle.
      
       - A fix for boot failures on txx9 systems following memory
         initialization changes made this cycle.
      
       - Bounds check virt_addr_valid() to prevent it spuriously indicating
         that bogus addresses are valid, in turn fixing hardened usercopy
         failures that have been present since v4.12.
      
       - Build uImage.gz for pistachio systems by default, since this is the
         image we need in order to actually boot on a board.
      
       - Remove an unused variable in our uprobes code.
      
      * tag 'mips_fixes_5.2_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: uprobes: remove set but not used variable 'epc'
        MIPS: pistachio: Build uImage.gz by default
        MIPS: Make virt_addr_valid() return bool
        MIPS: Bounds check virt_addr_valid
        MIPS: TXx9: Fix boot crash in free_initmem()
        MIPS: remove a space after -I to cope with header search paths for VDSO
        MIPS: mark ginvt() as __always_inline
      d0cc617a
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 9331b674
      Linus Torvalds authored
      Pull yet more SPDX updates from Greg KH:
       "Another round of SPDX header file fixes for 5.2-rc4
      
        These are all more "GPL-2.0-or-later" or "GPL-2.0-only" tags being
        added, based on the text in the files. We are slowly chipping away at
        the 700+ different ways people tried to write the license text. All of
        these were reviewed on the spdx mailing list by a number of different
        people.
      
        We now have over 60% of the kernel files covered with SPDX tags:
      	$ ./scripts/spdxcheck.py -v 2>&1 | grep Files
      	Files checked:            64533
      	Files with SPDX:          40392
      	Files with errors:            0
      
        I think the majority of the "easy" fixups are now done, it's now the
        start of the longer-tail of crazy variants to wade through"
      
      * tag 'spdx-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (159 commits)
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 450
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 449
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 448
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 446
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 445
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 444
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 443
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 442
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 438
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 437
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 436
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 435
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 434
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 433
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 432
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 431
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 430
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 429
        ...
      9331b674
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 1ce2c851
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 5.2-rc4 to resolve
        a number of reported issues.
      
        The most "notable" one here is the kernel headers in proc^Wsysfs
        fixes. Those changes move the header file info into sysfs and fixes
        the build issues that you reported.
      
        Other than that, a bunch of small habanalabs driver fixes, some fpga
        driver fixes, and a few other tiny driver fixes.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'char-misc-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        habanalabs: Read upper bits of trace buffer from RWPHI
        habanalabs: Fix virtual address access via debugfs for 2MB pages
        fpga: zynqmp-fpga: Correctly handle error pointer
        habanalabs: fix bug in checking huge page optimization
        habanalabs: Avoid using a non-initialized MMU cache mutex
        habanalabs: fix debugfs code
        uapi/habanalabs: add opcode for enable/disable device debug mode
        habanalabs: halt debug engines on user process close
        test_firmware: Use correct snprintf() limit
        genwqe: Prevent an integer overflow in the ioctl
        parport: Fix mem leak in parport_register_dev_model
        fpga: dfl: expand minor range when registering chrdev region
        fpga: dfl: Add lockdep classes for pdata->lock
        fpga: dfl: afu: Pass the correct device to dma_mapping_error()
        fpga: stratix10-soc: fix use-after-free on s10_init()
        w1: ds2408: Fix typo after 49695ac4 (reset on output_write retry with readback)
        kheaders: Do not regenerate archive if config is not changed
        kheaders: Move from proc to sysfs
        lkdtm/bugs: Adjust recursion test to avoid elision
        lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical
      1ce2c851
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 902b2edf
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "I2C has a driver bugfix and a MAINTAINERS fix"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        MAINTAINERS: Karthikeyan Ramasubramanian is MIA
        i2c: xiic: Add max_read_len quirk
      902b2edf
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.2-rc4' of git://git.infradead.org/users/vkoul/slave-dma · 66b59f2b
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
      
       - jz4780 transfer fix for acking descriptors early
      
       - fsl-qdma: clean registers on error
      
       - dw-axi-dmac: null pointer dereference fix
      
       - mediatek-cqdma: fix sleeping in atomic context
      
       - tegra210-adma: fix bunch os issues like crashing in driver probe,
         channel FIFO configuration etc.
      
       - sprd: Fixes for possible crash on descriptor status, block length
         overflow. For 2-stage transfer fix incorrect start, configuration and
         interrupt handling.
      
      * tag 'dmaengine-fix-5.2-rc4' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: sprd: Add interrupt support for 2-stage transfer
        dmaengine: sprd: Fix the right place to configure 2-stage transfer
        dmaengine: sprd: Fix block length overflow
        dmaengine: sprd: Fix the incorrect start for 2-stage destination channels
        dmaengine: sprd: Add validation of current descriptor in irq handler
        dmaengine: sprd: Fix the possible crash when getting descriptor status
        dmaengine: tegra210-adma: Fix spelling
        dmaengine: tegra210-adma: Fix channel FIFO configuration
        dmaengine: tegra210-adma: Fix crash during probe
        dmaengine: mediatek-cqdma: sleeping in atomic context
        dmaengine: dw-axi-dmac: fix null dereference when pointer first is null
        dmaengine: fsl-qdma: Add improvement
        dmaengine: jz4780: Fix transfers being ACKed too soon
      66b59f2b
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190608' of git://git.kernel.dk/linux-block · 8d72e5bd
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Allow symlink from the bfq.weight cgroup parameter to the general
         weight (Angelo)
      
       - Damien is new skd maintainer (Bart)
      
       - NVMe pull request from Sagi, with a few small fixes.
      
       - Ensure we set DMA segment size properly, dma-debug is now tripping on
         these (Christoph)
      
       - Remove useless debugfs_create() return check (Greg)
      
       - Remove redundant unlikely() check on IS_ERR() (Kefeng)
      
       - Fixup request freeing on exit (Ming)
      
      * tag 'for-linus-20190608' of git://git.kernel.dk/linux-block:
        block, bfq: add weight symlink to the bfq.weight cgroup parameter
        cgroup: let a symlink too be created with a cftype file
        block: free sched's request pool in blk_cleanup_queue
        nvme-rdma: use dynamic dma mapping per command
        nvme: Fix u32 overflow in the number of namespace list calculation
        mmc: also set max_segment_size in the device
        mtip32xx: also set max_segment_size in the device
        rsxx: don't call dma_set_max_seg_size
        nvme-pci: don't limit DMA segement size
        block: Drop unlikely before IS_ERR(_OR_NULL)
        block: aoe: no need to check return value of debugfs_create functions
        nvmet: fix data_len to 0 for bdev-backed write_zeroes
        MAINTAINERS: Hand over skd maintainership
        nvme-tcp: fix queue mapping when queue count is limited
        nvme-rdma: fix queue mapping when queue count is limited
      8d72e5bd
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 1b02caa3
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two bug fixes, both for fairly serious problems; the UFS one looks
        like it could be used to exfiltrate data from the kernel, although
        probably only a privileged user has access to the command management
        interface and the missing unlock in smartpqi is long standing and
        probably a little used error path"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: smartpqi: unlock on error in pqi_submit_raid_request_synchronous()
        scsi: ufs: Check that space was properly alloced in copy_query_response
      1b02caa3
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-5.2-rc4-2' of... · 0ad43e29
      Linus Torvalds authored
      Merge tag 'linux-kselftest-5.2-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fix from Shuah Khan:
       "This consists of a single fix for a vm test build failure regression
        when it is built by itself"
      
      * tag 'linux-kselftest-5.2-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: vm: Fix test build failure when built by itself
      0ad43e29
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-06-07-1' of git://anongit.freedesktop.org/drm/drm · 79c3ba32
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "A small bit more lively this week but not majorly so. I'm away in
        Japan next week for family holiday, so I'll be pretty disconnected,
        I've asked Daniel to do fixes for the week while I'm out.
      
        The nouveau firmware changes are a bit large, but they address a big
        problem where a whole set of boards don't load with the driver, and
        the new firmware fixes that, so I think it's worth trying to land it
        now.
      
        core:
         - Allow fb changes in async commits (drivers as well)
      
        udmabuf:
         - Unmap scatterlist when unmapping udmabuf
      
        nouveau:
         - firmware loading fixes for secboot firmware on new GPU revision.
      
        komeda:
         - oops, dma mapping and warning fixes
      
        arm-hdlcd:
         - clock fixes
         - mode validation fix
      
        i915:
         - Add a missing Icelake workaround
         - GVT - DMA map fault fix and enforcement fixes
      
        amdgpu:
         - DCE resume fix
         - New raven variation updates"
      
      * tag 'drm-fixes-2019-06-07-1' of git://anongit.freedesktop.org/drm/drm: (33 commits)
        drm/nouveau/secboot/gp10[2467]: support newer FW to fix SEC2 failures on some boards
        drm/nouveau/secboot: enable loading of versioned LS PMU/SEC2 ACR msgqueue FW
        drm/nouveau/secboot: split out FW version-specific LS function pointers
        drm/nouveau/secboot: pass max supported FW version to LS load funcs
        drm/nouveau/core: support versioned firmware loading
        drm/nouveau/core: pass subdev into nvkm_firmware_get, rather than device
        drm/komeda: Potential error pointer dereference
        drm/komeda: remove set but not used variable 'kcrtc'
        drm/amd/amdgpu: add RLC firmware to support raven1 refresh
        drm/amd/powerplay: add set_power_profile_mode for raven1_refresh
        drm/amdgpu: fix ring test failure issue during s3 in vce 3.0 (V2)
        udmabuf: actually unmap the scatterlist
        drm/arm/hdlcd: Allow a bit of clock tolerance
        drm/arm/hdlcd: Actually validate CRTC modes
        drm/arm/mali-dp: Add a loop around the second set CVAL and try 5 times
        drm/komeda: fixing of DMA mapping sg segment warning
        drm: don't block fb changes for async plane updates
        drm/vc4: fix fb references in async update
        drm/msm: fix fb references in async update
        drm/amd: fix fb references in async update
        ...
      79c3ba32
  4. 07 Jun, 2019 20 commits
    • Wolfram Sang's avatar
      MAINTAINERS: Karthikeyan Ramasubramanian is MIA · 8f77293c
      Wolfram Sang authored
      A mail just bounced back with "user unknown":
      
      550 5.1.1 <kramasub@codeaurora.org> User doesn't exist
      
      I also couldn't find a more recent address in git history. So, remove
      this stale entry.
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      8f77293c
    • Robert Hancock's avatar
      i2c: xiic: Add max_read_len quirk · 49b80958
      Robert Hancock authored
      This driver does not support reading more than 255 bytes at once because
      the register for storing the number of bytes to read is only 8 bits. Add
      a max_read_len quirk to enforce this.
      
      This was found when using this driver with the SFP driver, which was
      previously reading all 256 bytes in the SFP EEPROM in one transaction.
      This caused a bunch of hard-to-debug errors in the xiic driver since the
      driver/logic was treating the number of bytes to read as zero.
      Rejecting transactions that aren't supported at least allows the problem
      to be diagnosed more easily.
      Signed-off-by: default avatarRobert Hancock <hancock@sedsystems.ca>
      Reviewed-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      49b80958
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.2-rc4' of... · d4425649
      Linus Torvalds authored
      Merge tag 'hwmon-for-v5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
      
       - Fix a couple of inconsistencies and locking problems in pmbus driver
      
       - Register with thermal subsystem only on systems supporting devicetree
      
      * tag 'hwmon-for-v5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (pmbus/core) Treat parameters as paged if on multiple pages
        hwmon: (pmbus/core) mutex_lock write in pmbus_set_samples
        hwmon: (core) add thermal sensors only if dev->of_node is present
      d4425649
    • Jan Glauber's avatar
      lockref: Limit number of cmpxchg loop retries · 893a7d32
      Jan Glauber authored
      The lockref cmpxchg loop is unbound as long as the spinlock is not
      taken. Depending on the hardware implementation of compare-and-swap
      a high number of loop retries might happen.
      
      Add an upper bound to the loop to force the fallback to spinlocks
      after some time. A retry value of 100 should not impact any hardware
      that does not have this issue.
      
      With the retry limit the performance of an open-close testcase
      improved between 60-70% on ThunderX2.
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJan Glauber <jglauber@marvell.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      893a7d32
    • Andrey Konovalov's avatar
      uaccess: add noop untagged_addr definition · d9344522
      Andrey Konovalov authored
      Architectures that support memory tagging have a need to perform untagging
      (stripping the tag) in various parts of the kernel. This patch adds an
      untagged_addr() macro, which is defined as noop for architectures that do
      not support memory tagging. The oncoming patch series will define it at
      least for sparc64 and arm64.
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarKhalid Aziz <khalid.aziz@oracle.com>
      Signed-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d9344522
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20190607' of git://github.com/jcmvbkbc/linux-xtensa · d18c7e9d
      Linus Torvalds authored
      Pull xtensa fix from Max Filippov:
       "Fix a section mismatch between memblock_reserve and mem_reserve.
      
        This fixes tinyconfig xtensa builds"
      
      * tag 'xtensa-20190607' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: Fix section mismatch between memblock_reserve and mem_reserve
      d18c7e9d
    • Jens Axboe's avatar
      Merge branch 'nvme-5.2-rc-next' of git://git.infradead.org/nvme into for-linus · 6c70f899
      Jens Axboe authored
      Pull NVMe fixes from Sagi.
      
      * 'nvme-5.2-rc-next' of git://git.infradead.org/nvme:
        nvme-rdma: use dynamic dma mapping per command
        nvme: Fix u32 overflow in the number of namespace list calculation
        nvmet: fix data_len to 0 for bdev-backed write_zeroes
        nvme-tcp: fix queue mapping when queue count is limited
        nvme-rdma: fix queue mapping when queue count is limited
      6c70f899
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.2-2' of... · 33de0d1c
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull more Kbuild fixes from Masahiro Yamada:
      
       - fix kselftest-merge to find config fragments in deeper directories
      
       - fix kconfig unit test, which was broken by SPDX tag addition
      
       - add + prefix to buildtar to suppress jobserver unavailable warning
      
       - fix checkstack.pl to recognize arch=arm64
      
       - suppress noisy warning from cc-cross-prefix
      
      * tag 'kbuild-fixes-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: use more portable 'command -v' for cc-cross-prefix
        scripts/checkstack.pl: Fix arm64 wrong or unknown architecture
        kbuild: tar-pkg: enable communication with jobserver
        kconfig: tests: fix recursive inclusion unit test
        kbuild: teach kselftest-merge to find nested config files
      33de0d1c
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 91f152e7
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "Here's a couple of MMC and MEMSTICK fixes:
      
        MMC host:
         - sdhci: Fix SDIO IRQ thread deadlock
         - sdhci-tegra: Fix a warning message
         - sdhci_am654: Fix SLOTTYPE write
         - meson-gx: Fix IRQ ack
         - tmio: Fix SCC error handling to avoid false positive CRC error
      
        MEMSTICK core:
         - mspro_block: Fix returning a correct error code"
      
      * tag 'mmc-v5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci_am654: Fix SLOTTYPE write
        mmc: sdhci: Fix SDIO IRQ thread deadlock
        mmc: meson-gx: fix irq ack
        mmc: tmio: fix SCC error handling to avoid false positive CRC error
        mmc: tegra: Fix a warning message
        memstick: mspro_block: Fix an error code in mspro_block_issue_req()
      91f152e7
    • Linus Torvalds's avatar
      Merge tag 'pm-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · a373ec23
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix a crash during resume from hibernation introduced during the
        4.19 cycle, cause the new Performance and Energy Bias Hint (EPB) code
        to be built only if CONFIG_PM is set and add a few missing kerneldoc
        comments.
      
        Specifics:
      
         - Fix a crash that occurs when a kernel with 'nosmt' in the command
           line is used to resume the system from hibernation (as the
           "restore" kernel), because memory mapping differences between the
           restore and image kernels cause SMT siblings to be woken up from
           idle states and subsequently they try to fetch instructions from
           incorrect memory locations (Jiri Kosina).
      
         - Cause the new Performance and Energy Bias Hint (EPB) code to be
           built only if CONFIG_PM is set, because that code is not really
           necessary otherwise (Rafael Wysocki).
      
         - Add kerneldoc comments to documents some helper functions related
           to system-wide suspend to avoid possible confusion regarding their
           purpose (Rafael Wysocki)"
      
      * tag 'pm-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        x86/power: Fix 'nosmt' vs hibernation triple fault during resume
        PM: sleep: Add kerneldoc comments to some functions
        x86: intel_epb: Do not build when CONFIG_PM is unset
      a373ec23
    • Jann Horn's avatar
      x86/insn-eval: Fix use-after-free access to LDT entry · de9f8696
      Jann Horn authored
      get_desc() computes a pointer into the LDT while holding a lock that
      protects the LDT from being freed, but then drops the lock and returns the
      (now potentially dangling) pointer to its caller.
      
      Fix it by giving the caller a copy of the LDT entry instead.
      
      Fixes: 670f928b ("x86/insn-eval: Add utility function to get segment descriptor")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      de9f8696
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 1e1d9263
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Free AF_PACKET po->rollover properly, from Willem de Bruijn.
      
       2) Read SFP eeprom in max 16 byte increments to avoid problems with
          some SFP modules, from Russell King.
      
       3) Fix UDP socket lookup wrt. VRF, from Tim Beale.
      
       4) Handle route invalidation properly in s390 qeth driver, from Julian
          Wiedmann.
      
       5) Memory leak on unload in RDS, from Zhu Yanjun.
      
       6) sctp_process_init leak, from Neil HOrman.
      
       7) Fix fib_rules rule insertion semantic change that broke Android,
          from Hangbin Liu.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits)
        pktgen: do not sleep with the thread lock held.
        net: mvpp2: Use strscpy to handle stat strings
        net: rds: fix memory leak in rds_ib_flush_mr_pool
        ipv6: fix EFAULT on sendto with icmpv6 and hdrincl
        ipv6: use READ_ONCE() for inet->hdrincl as in ipv4
        Revert "fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied"
        net: aquantia: fix wol configuration not applied sometimes
        ethtool: fix potential userspace buffer overflow
        Fix memory leak in sctp_process_init
        net: rds: fix memory leak when unload rds_rdma
        ipv6: fix the check before getting the cookie in rt6_get_cookie
        ipv4: not do cache for local delivery if bc_forwarding is enabled
        s390/qeth: handle error when updating TX queue count
        s390/qeth: fix VLAN attribute in bridge_hostnotify udev event
        s390/qeth: check dst entry before use
        s390/qeth: handle limited IPv4 broadcast in L3 TX path
        net: fix indirect calls helpers for ptype list hooks.
        net: ipvlan: Fix ipvlan device tso disabled while NETIF_F_IP_CSUM is set
        udp: only choose unbound UDP socket for multicast when not in a VRF
        net/tls: replace the sleeping lock around RX resync with a bit lock
        ...
      1e1d9263
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 6e38335d
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Things are looking pretty quiet here in RDMA, not too many bug fixes
        rolling in right now. The usual driver bug fixes and fixes for a
        couple of regressions introduced in 5.2:
      
         - Fix a race on bootup with RDMA device renaming and srp. SRP also
           needs to rename its internal sys files
      
         - Fix a memory leak in hns
      
         - Don't leak resources in efa on certain error unwinds
      
         - Don't panic in certain error unwinds in ib_register_device
      
         - Various small user visible bug fix patches for the hfi and efa
           drivers
      
         - Fix the 32 bit compilation break"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/efa: Remove MAYEXEC flag check from mmap flow
        mlx5: avoid 64-bit division
        IB/hfi1: Validate page aligned for a given virtual address
        IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value
        IB/hfi1: Insure freeze_work work_struct is canceled on shutdown
        IB/rdmavt: Fix alloc_qpn() WARN_ON()
        RDMA/core: Fix panic when port_data isn't initialized
        RDMA/uverbs: Pass udata on uverbs error unwind
        RDMA/core: Clear out the udata before error unwind
        RDMA/hns: Fix PD memory leak for internal allocation
        RDMA/srp: Rename SRP sysfs name after IB device rename trigger
      6e38335d
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · a02a532c
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "Another round of mostly-benign fixes, the exception being a boot crash
        on SVE2-capable CPUs (although I don't know where you'd find such a
        thing, so maybe it's benign too).
      
        We're in the process of resolving some big-endian ptrace breakage, so
        I'll probably have some more for you next week.
      
        Summary:
      
         - Fix boot crash on platforms with SVE2 due to missing register
           encoding
      
         - Fix architected timer accessors when CONFIG_OPTIMIZE_INLINING=y
      
         - Move cpu_logical_map into smp.h for use by upcoming irqchip drivers
      
         - Trivial typo fix in comment
      
         - Disable some useless, noisy warnings from GCC 9"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: Silence gcc warnings about arch ABI drift
        ARM64: trivial: s/TIF_SECOMP/TIF_SECCOMP/ comment typo fix
        arm64: arch_timer: mark functions as __always_inline
        arm64: smp: Moved cpu_logical_map[] to smp.h
        arm64: cpufeature: Fix missing ZFR0 in __read_sysreg_by_encoding()
      a02a532c
    • Masahiro Yamada's avatar
      kbuild: use more portable 'command -v' for cc-cross-prefix · 913ab978
      Masahiro Yamada authored
      To print the pathname that will be used by shell in the current
      environment, 'command -v' is a standardized way. [1]
      
      'which' is also often used in scripts, but it is less portable.
      
      When I worked on commit bd55f96f ("kbuild: refactor cc-cross-prefix
      implementation"), I was eager to use 'command -v' but it did not work.
      (The reason is explained below.)
      
      I kept 'which' as before but got rid of '> /dev/null 2>&1' as I
      thought it was no longer needed. Sorry, I was wrong.
      
      It works well on my Ubuntu machine, but Alexey Brodkin reports noisy
      warnings on CentOS7 when 'which' fails to find the given command in
      the PATH environment.
      
        $ which foo
        which: no foo in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
      
      Given that behavior of 'which' depends on system (and it may not be
      installed by default), I want to try 'command -v' once again.
      
      The specification [1] clearly describes the behavior of 'command -v'
      when the given command is not found:
      
        Otherwise, no output shall be written and the exit status shall reflect
        that the name was not found.
      
      However, we need a little magic to use 'command -v' from Make.
      
      $(shell ...) passes the argument to a subshell for execution, and
      returns the standard output of the command.
      
      Here is a trick. GNU Make may optimize this by executing the command
      directly instead of forking a subshell, if no shell special characters
      are found in the command and omitting the subshell will not change the
      behavior.
      
      In this case, no shell special character is used. So, Make will try
      to run it directly. However, 'command' is a shell-builtin command,
      then Make would fail to find it in the PATH environment:
      
        $ make ARCH=m68k defconfig
        make: command: Command not found
        make: command: Command not found
        make: command: Command not found
      
      In fact, Make has a table of shell-builtin commands because it must
      ask the shell to execute them.
      
      Until recently, 'command' was missing in the table.
      
      This issue was fixed by the following commit:
      
      | commit 1af314465e5dfe3e8baa839a32a72e83c04f26ef
      | Author: Paul Smith <psmith@gnu.org>
      | Date:   Sun Nov 12 18:10:28 2017 -0500
      |
      |     * job.c: Add "command" as a known shell built-in.
      |
      |     This is not a POSIX shell built-in but it's common in UNIX shells.
      |     Reported by Nick Bowler <nbowler@draconx.ca>.
      
      Because the latest release is GNU Make 4.2.1 in 2016, this commit is
      not included in any released versions. (But some distributions may
      have back-ported it.)
      
      We need to trick Make to spawn a subshell. There are various ways to
      do so:
      
       1) Use a shell special character '~' as dummy
      
          $(shell : ~; command -v $(c)gcc)
      
       2) Use a variable reference that always expands to the empty string
          (suggested by David Laight)
      
          $(shell command$${x:+} -v $(c)gcc)
      
       3) Use redirect
      
          $(shell command -v $(c)gcc 2>/dev/null)
      
      I chose 3) to not confuse people. The stderr would not be polluted
      anyway, but it will provide extra safety, and is easy to understand.
      
      Tested on Make 3.81, 3.82, 4.0, 4.1, 4.2, 4.2.1
      
      [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
      
      Fixes: bd55f96f ("kbuild: refactor cc-cross-prefix implementation")
      Cc: linux-stable <stable@vger.kernel.org> # 5.1
      Reported-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      913ab978
    • Vasily Gorbik's avatar
      s390/unwind: correct stack switching during unwind · 0ab0d7ac
      Vasily Gorbik authored
      Adjust conditions in on_stack function. That fixes backchain unwinder
      which was unable to read pt_regs at the very bottom of the stack and
      hence couldn't follow stacks (e.g. from async stack to a task stack).
      
      Fixes: 78c98f90 ("s390/unwind: introduce stack unwind API")
      Reported-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      0ab0d7ac
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-x86' · a964d23c
      Rafael J. Wysocki authored
      * pm-x86:
        x86/power: Fix 'nosmt' vs hibernation triple fault during resume
        x86: intel_epb: Do not build when CONFIG_PM is unset
      a964d23c
    • Angelo Ruocco's avatar
      block, bfq: add weight symlink to the bfq.weight cgroup parameter · 19e9da9e
      Angelo Ruocco authored
      Many userspace tools and services use the proportional-share policy of
      the blkio/io cgroups controller. The CFQ I/O scheduler implemented
      this policy for the legacy block layer. To modify the weight of a
      group in case CFQ was in charge, the 'weight' parameter of the group
      must be modified. On the other hand, the BFQ I/O scheduler implements
      the same policy in blk-mq, but, with BFQ, the parameter to modify has
      a different name: bfq.weight (forced choice until legacy block was
      present, because two different policies cannot share a common parameter
      in cgroups).
      
      Due to CFQ legacy, most if not all userspace configurations still use
      the parameter 'weight', and for the moment do not seem likely to be
      changed. But, when CFQ went away with legacy block, such a parameter
      ceased to exist.
      
      So, a simple workaround has been proposed [1] to make all
      configurations work: add a symlink, named weight, to bfq.weight. This
      commit adds such a symlink.
      
      [1] https://lkml.org/lkml/2019/4/8/555Suggested-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: default avatarAngelo Ruocco <angeloruocco90@gmail.com>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      19e9da9e
    • Angelo Ruocco's avatar
      cgroup: let a symlink too be created with a cftype file · 54b7b868
      Angelo Ruocco authored
      This commit enables a cftype to have a symlink (of any name) that
      points to the file associated with the cftype.
      Signed-off-by: default avatarAngelo Ruocco <angeloruocco90@gmail.com>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      54b7b868
    • Dave Airlie's avatar
      Merge branch 'linux-5.2' of git://github.com/skeggsb/linux into drm-fixes · 671e2ee5
      Dave Airlie authored
      " This is a bit more than I'd like to be pushing at this point in a
      cycle, but it's a fairly important issue.  There's been numerous
      reports of more recent GP10[2467] boards failing to load, and I've
      worked with NVIDIA FW engineers and tracked this down to the FW we've
      been using not properly supporting the boards in question.
      
      I've pushed an update to linux-firmware with the new FW version, which
      unfortunately contains API changes vs the older firmware.
      
      This series teaches the ACR subsystem inside nouveau enough to be able
      to deal with supporting multiple incompatible FW revisions, and adds
      support to the relevant chipsets for loading the newer FW revision, if
      it's available."
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Ben Skeggs <skeggsb@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv7pG+vur0Kn_TyU3ainnkvJVw07upnnaQNOToF+kzQtDQ@mail.gmail.com
      671e2ee5