1. 07 Apr, 2021 4 commits
    • 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. 06 Apr, 2021 8 commits
  3. 05 Apr, 2021 1 commit
  4. 04 Apr, 2021 4 commits
    • Linus Torvalds's avatar
      Linux 5.12-rc6 · e49d033b
      Linus Torvalds authored
      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. 03 Apr, 2021 14 commits
  6. 02 Apr, 2021 9 commits