Skip to content
  1. Apr 08, 2021
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 3a229812
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Most of the changes again are devicetree fixes, but there are also
        five trivial build fixes for issues I found when test building with
        gcc-11 or when running 'make W=1', and some OMAP platform specific
        code fixups.
      
        Broadcom:
         - One revert for a Raspberry pi interrupt controller change that
           caused a regression.
      
        TI OMAP:
         - Remove unused duplicate sha2md5_fck clock node that can race with
           the OMAP4_SHA2MD5_CLKCTRL clock node for disable for unused clocks
      
         - Add aliases for omap4/5 mmc to put the slots back into the right
           order again
      
         - Fix typo for bionic voltage controllers that accidentally use mpu
           for all instances instead of mpu, core and iva
      
         - Fix random hangs for droid4 caused by missing fix from TI Android
           kernel tree to do a dummy smc call on cpuidle wakeup path
      
        NXP i.MX:
         - Fix a system failure on imx6qdl-phytec-pfla02 board when booting
           from SD, by adding missing vmmc supply for SD interfaces.
      
         - Fix address typo in i.MX8MM/Q IOMUXC_SD1_DATA0_GPIO2_IO2
           definition.
      
        Marvell mvebu:
         - Fix storm interrupt on Turris Omnia
      
         - Enable hardware buffer management as it should be
      
        ... and build fixes for PXA, Freescale, Marvell, OMAP1 and Keystone"
      
      * tag 'arm-fixes-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: dts: turris-omnia: configure LED[2]/INTn pin as interrupt pin
        ARM: dts: turris-omnia: fix hardware buffer management
        Revert "arm64: dts: marvell: armada-cp110: Switch to per-port SATA interrupts"
        ARM: mvebu: avoid clang -Wtautological-constant warning
        ARM: pxa: mainstone: avoid -Woverride-init warning
        ARM: omap1: fix building with clang IAS
        soc/fsl: qbman: fix conflicting alignment attributes
        ARM: keystone: fix integer overflow warning
        ARM: dts: imx6: pbab01: Set vmmc supply for both SD interfaces
        arm64: dts: imx8mm/q: Fix pad control of SD1_DATA0
        ARM: OMAP4: PM: update ROM return address for OSWR and OFF
        ARM: OMAP4: Fix PMIC voltage domains for bionic
        ARM: dts: Fix moving mmc devices with aliases for omap4 & 5
        ARM: dts: Drop duplicate sha2md5_fck to fix clk_disable race
        Revert "ARM: dts: bcm2711: Add the BSC interrupt controller"
      3a229812
    • Linus Torvalds's avatar
      Merge branch 'parisc-5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · dbaa5d1c
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
       "One link error fix found by the kernel test robot, one sparse warning
        fix, remove a duplicate declaration and some spelling fixes"
      
      * 'parisc-5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: math-emu: Few spelling fixes in the file fpu.h
        parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers
        parisc: parisc-agp requires SBA IOMMU driver
        parisc: Remove duplicate struct task_struct declaration
      dbaa5d1c
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.12-3' of... · 5ba091db
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fix from Hans de Goede:
       "A single bugfix to fix spurious wakeups from suspend caused by recent
        intel-hid driver changes"
      
      * tag 'platform-drivers-x86-v5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86: intel-hid: Fix spurious wakeups caused by tablet-mode events during suspend
      5ba091db
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.12-rc6' of... · e3bb2f4f
      Linus Torvalds authored
      Merge tag 'regulator-fix-v5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "bd9571mwv regulator fixes for v5.12.
      
        A set of driver specific fixes here, the main one is a fix to not try
        to set unsupported voltages on this device. The other two patches
        clean up the error handling and eliminate the possibility that we
        could overflow the page when writing sysfs output (which AFAICT wasn't
        an issue but better to be sure)"
      
      * tag 'regulator-fix-v5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: bd9571mwv: Convert device attribute to sysfs_emit()
        regulator: bd9571mwv: Fix regulator name printed on registration failure
        regulator: bd9571mwv: Fix AVS and DVFS voltage range
      e3bb2f4f
  2. Apr 07, 2021
  3. Apr 06, 2021
  4. Apr 05, 2021
    • Linus Torvalds's avatar
      Linux 5.12-rc6 · e49d033b
      Linus Torvalds authored
      v5.12-rc6
      e49d033b
    • Zheyu Ma's avatar
      firewire: nosy: Fix a use-after-free bug in nosy_ioctl() · 829933ef
      Zheyu Ma authored
      For each device, the nosy driver allocates a pcilynx structure.
      A use-after-free might happen in the following scenario:
      
       1. Open nosy device for the first time and call ioctl with command
          NOSY_IOC_START, then a new client A will be malloced and added to
          doubly linked list.
       2. Open nosy device for the second time and call ioctl with command
          NOSY_IOC_START, then a new client B will be malloced and added to
          doubly linked list.
       3. Call ioctl with command NOSY_IOC_START for client A, then client A
          will be readded to the doubly linked list. Now the doubly linked
          list is messed up.
       4. Close the first nosy device and nosy_release will be called. In
          nosy_release, client A will be unlinked and freed.
       5. Close the second nosy device, and client A will be referenced,
          resulting in UAF.
      
      The root cause of this bug is that the element in the doubly linked list
      is reentered into the list.
      
      Fix this bug by adding a check before inserting a client.  If a client
      is already in the linked list, don't insert it.
      
      The following KASAN report reveals it:
      
         BUG: KASAN: use-after-free in nosy_release+0x1ea/0x210
         Write of size 8 at addr ffff888102ad7360 by task poc
         CPU: 3 PID: 337 Comm: poc Not tainted 5.12.0-rc5+ #6
         Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
         Call Trace:
           nosy_release+0x1ea/0x210
           __fput+0x1e2/0x840
           task_work_run+0xe8/0x180
           exit_to_user_mode_prepare+0x114/0x120
           syscall_exit_to_user_mode+0x1d/0x40
           entry_SYSCALL_64_after_hwframe+0x44/0xae
      
         Allocated by task 337:
           nosy_open+0x154/0x4d0
           misc_open+0x2ec/0x410
           chrdev_open+0x20d/0x5a0
           do_dentry_open+0x40f/0xe80
           path_openat+0x1cf9/0x37b0
           do_filp_open+0x16d/0x390
           do_sys_openat2+0x11d/0x360
           __x64_sys_open+0xfd/0x1a0
           do_syscall_64+0x33/0x40
           entry_SYSCALL_64_after_hwframe+0x44/0xae
      
         Freed by task 337:
           kfree+0x8f/0x210
           nosy_release+0x158/0x210
           __fput+0x1e2/0x840
           task_work_run+0xe8/0x180
           exit_to_user_mode_prepare+0x114/0x120
           syscall_exit_to_user_mode+0x1d/0x40
           entry_SYSCALL_64_after_hwframe+0x44/0xae
      
         The buggy address belongs to the object at ffff888102ad7300 which belongs to the cache kmalloc-128 of size 128
         The buggy address is located 96 bytes inside of 128-byte region [ffff888102ad7300, ffff888102ad7380)
      
      [ Modified to use 'list_empty()' inside proper lock  - Linus ]
      
      Link: https://lore.kernel.org/lkml/1617433116-5930-1-git-send-email-zheyuma97@gmail.com/
      
      
      Reported-and-tested-by: default avatar马哲宇 (Zheyu Ma) <zheyuma97@gmail.com>
      Signed-off-by: default avatarZheyu Ma <zheyuma97@gmail.com>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      829933ef
    • Wang Qing's avatar
      workqueue/watchdog: Make unbound workqueues aware of touch_softlockup_watchdog() · 89e28ce6
      Wang Qing authored
      
      84;0;0c84;0;0c
      There are two workqueue-specific watchdog timestamps:
      
          + @wq_watchdog_touched_cpu (per-CPU) updated by
            touch_softlockup_watchdog()
      
          + @wq_watchdog_touched (global) updated by
            touch_all_softlockup_watchdogs()
      
      watchdog_timer_fn() checks only the global @wq_watchdog_touched for
      unbound workqueues. As a result, unbound workqueues are not aware
      of touch_softlockup_watchdog(). The watchdog might report a stall
      even when the unbound workqueues are blocked by a known slow code.
      
      Solution:
      touch_softlockup_watchdog() must touch also the global @wq_watchdog_touched
      timestamp.
      
      The global timestamp can no longer be used for bound workqueues because
      it is now updated from all CPUs. Instead, bound workqueues have to check
      only @wq_watchdog_touched_cpu and these timestamps have to be updated for
      all CPUs in touch_all_softlockup_watchdogs().
      
      Beware:
      The change might cause the opposite problem. An unbound workqueue
      might get blocked on CPU A because of a real softlockup. The workqueue
      watchdog would miss it when the timestamp got touched on CPU B.
      
      It is acceptable because softlockups are detected by softlockup
      watchdog. The workqueue watchdog is there to detect stalls where
      a work never finishes, for example, because of dependencies of works
      queued into the same workqueue.
      
      V3:
      - Modify the commit message clearly according to Petr's suggestion.
      
      Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      89e28ce6
    • Zqiang's avatar
      workqueue: Move the position of debug_work_activate() in __queue_work() · 0687c66b
      Zqiang authored
      The debug_work_activate() is called on the premise that
      the work can be inserted, because if wq be in WQ_DRAINING
      status, insert work may be failed.
      
      Fixes: e41e704b
      
       ("workqueue: improve destroy_workqueue() debuggability")
      Signed-off-by: default avatarZqiang <qiang.zhang@windriver.com>
      Reviewed-by: default avatarLai Jiangshan <jiangshanlai@gmail.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      0687c66b
  5. Apr 04, 2021
  6. Apr 03, 2021
    • Jens Axboe's avatar
      io_uring: fix !CONFIG_BLOCK compilation failure · e82ad485
      Jens Axboe authored
      kernel test robot correctly pinpoints a compilation failure if
      CONFIG_BLOCK isn't set:
      
      fs/io_uring.c: In function '__io_complete_rw':
      >> fs/io_uring.c:2509:48: error: implicit declaration of function 'io_rw_should_reissue'; did you mean 'io_rw_reissue'? [-Werror=implicit-function-declaration]
          2509 |  if ((res == -EAGAIN || res == -EOPNOTSUPP) && io_rw_should_reissue(req)) {
               |                                                ^~~~~~~~~~~~~~~~~~~~
               |                                                io_rw_reissue
          cc1: some warnings being treated as errors
      
      Ensure that we have a stub declaration of io_rw_should_reissue() for
      !CONFIG_BLOCK.
      
      Fixes: 230d50d4
      
       ("io_uring: move reissue into regular IO path")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      e82ad485
    • Linus Torvalds's avatar
      Merge tag 'block-5.12-2021-04-02' of git://git.kernel.dk/linux-block · d93a0d43
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Remove comment that never came to fruition in 22 years of development
         (Christoph)
      
       - Remove unused request flag (Christoph)
      
       - Fix for null_blk fake timeout handling (Damien)
      
       - Fix for IOCB_NOWAIT being ignored for O_DIRECT on raw bdevs (Pavel)
      
       - Error propagation fix for multiple split bios (Yufen)
      
      * tag 'block-5.12-2021-04-02' of git://git.kernel.dk/linux-block:
        block: remove the unused RQF_ALLOCED flag
        block: update a few comments in uapi/linux/blkpg.h
        block: don't ignore REQ_NOWAIT for direct IO
        null_blk: fix command timeout completion handling
        block: only update parent bi_status when bio fail
      d93a0d43
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.12-2021-04-02' of git://git.kernel.dk/linux-block · 1faccb63
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Nothing really major in here, and finally nothing really related to
        signals. A few minor fixups related to the threading changes, and some
        general fixes, that's it.
      
        There's the pending gdb-get-confused-about-arch, but that's more of a
        cosmetic issue, nothing that hinder use of it. And given that other
        archs will likely be affected by that oddity too, better to postpone
        any changes there until 5.13 imho"
      
      * tag 'io_uring-5.12-2021-04-02' of git://git.kernel.dk/linux-block:
        io_uring: move reissue into regular IO path
        io_uring: fix EIOCBQUEUED iter revert
        io_uring/io-wq: protect against sprintf overflow
        io_uring: don't mark S_ISBLK async work as unbounded
        io_uring: drop sqd lock before handling signals for SQPOLL
        io_uring: handle setup-failed ctx in kill_timeouts
        io_uring: always go for cancellation spin on exec
      1faccb63
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 0a84c2e4
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix an ACPI tables management issue, an issue related to the
        ACPI enumeration of devices and CPU wakeup in the ACPI processor
        driver.
      
        Specifics:
      
         - Ensure that the memory occupied by ACPI tables on x86 will always
           be reserved to prevent it from being allocated for other purposes
           which was possible in some cases (Rafael Wysocki).
      
         - Fix the ACPI device enumeration code to prevent it from attempting
           to evaluate the _STA control method for devices with unmet
           dependencies which is likely to fail (Hans de Goede).
      
         - Fix the handling of CPU0 wakeup in the ACPI processor driver to
           prevent CPU0 online failures from occurring (Vitaly Kuznetsov)"
      
      * tag 'acpi-5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: processor: Fix CPU0 wakeup in acpi_idle_play_dead()
        ACPI: scan: Fix _STA getting called on devices with unmet dependencies
        ACPI: tables: x86: Reserve memory occupied by ACPI tables
      0a84c2e4
    • Linus Torvalds's avatar
      Merge tag 'pm-5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 9314a0e9
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix a race condition and an ordering issue related to using
        device links in the runtime PM framework and two kerneldoc comments in
        cpufreq.
      
        Specifics:
      
         - Fix race condition related to the handling of supplier devices
           during consumer device probe and fix the order of decrementation of
           two related reference counters in the runtime PM core code handling
           supplier devices (Adrian Hunter).
      
         - Fix kerneldoc comments in cpufreq that have not been updated along
           with the functions documented by them (Geert Uytterhoeven)"
      
      * tag 'pm-5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM: runtime: Fix race getting/putting suppliers at probe
        PM: runtime: Fix ordering in pm_runtime_get_suppliers()
        cpufreq: Fix scaling_{available,boost}_frequencies_show() comments
      9314a0e9
    • Marek Behún's avatar
      ARM: dts: turris-omnia: configure LED[2]/INTn pin as interrupt pin · a26c56ae
      Marek Behún authored
      
      
      Use the `marvell,reg-init` DT property to configure the LED[2]/INTn pin
      of the Marvell 88E1514 ethernet PHY on Turris Omnia into interrupt mode.
      
      Without this the pin is by default in LED[2] mode, and the Marvell PHY
      driver configures LED[2] into "On - Link, Blink - Activity" mode.
      
      This fixes the issue where the pca9538 GPIO/interrupt controller (which
      can't mask interrupts in HW) received too many interrupts and after a
      time started ignoring the interrupt with error message:
        IRQ 71: nobody cared
      
      There is a work in progress to have the Marvell PHY driver support
      parsing PHY LED nodes from OF and registering the LEDs as Linux LED
      class devices. Once this is done the PHY driver can also automatically
      set the pin into INTn mode if it does not find LED[2] in OF.
      
      Until then, though, we fix this via `marvell,reg-init` DT property.
      
      Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
      Reported-by: default avatarRui Salvaterra <rsalvaterra@gmail.com>
      Fixes: 26ca8b52
      
       ("ARM: dts: add support for Turris Omnia")
      Cc: Uwe Kleine-König <uwe@kleine-koenig.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Gregory CLEMENT <gregory.clement@bootlin.com>
      Cc: <stable@vger.kernel.org>
      Tested-by: default avatarRui Salvaterra <rsalvaterra@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
      a26c56ae
    • Rui Salvaterra's avatar
      ARM: dts: turris-omnia: fix hardware buffer management · 5b2c7e0a
      Rui Salvaterra authored
      Hardware buffer management has never worked on the Turris Omnia, as the
      required MBus window hadn't been reserved. Fix thusly.
      
      Fixes: 018b88ee
      
       ("ARM: dts: turris-omnia: enable HW buffer management")
      
      Signed-off-by: default avatarRui Salvaterra <rsalvaterra@gmail.com>
      Reviewed-by: default avatarMarek Behún <kabel@kernel.org>
      Tested-by: default avatarKlaus Kudielka <klaus.kudielka@gmail.com>
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
      5b2c7e0a
    • Gregory CLEMENT's avatar
      Revert "arm64: dts: marvell: armada-cp110: Switch to per-port SATA interrupts" · 967ff33e
      Gregory CLEMENT authored
      The driver part of this support was not merged which leads to break
      AHCI on all Marvell Armada 7k8k / CN913x platforms as it was reported
      by Marcin Wojtas.
      
      So for now let's remove it in order to fix the issue waiting for the
      driver part really be merged.
      
      This reverts commit 53e950d5.
      Fixes: 53e950d5
      
       ("arm64: dts: marvell: armada-cp110: Switch to per-port SATA interrupts")
      
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
      967ff33e
    • Christoph Hellwig's avatar
      block: remove the unused RQF_ALLOCED flag · f06c6096
      Christoph Hellwig authored
      
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f06c6096
    • Christoph Hellwig's avatar
      block: update a few comments in uapi/linux/blkpg.h · b9c6cdc3
      Christoph Hellwig authored
      
      
      The big top of the file comment talk about grand plans that never
      happened, so remove them to not confuse the readers.  Also mark the
      devname and volname fields as ignored as they were never used by the
      kernel.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      b9c6cdc3