1. 13 Aug, 2021 9 commits
    • Linus Torvalds's avatar
      Merge tag 'block-5.14-2021-08-13' of git://git.kernel.dk/linux-block · 020efdad
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes for block that should go into 5.14:
      
         - Revert the mq-deadline cgroup addition. More work is needed on this
           front, let's revert it for now and get it right before having it in
           a released kernel (Tejun)
      
         - blk-iocost lockdep fix (Ming)
      
         - nbd double completion fix (Xie)
      
         - Fix for non-idling when clearing the shared tag flag (Yu)"
      
      * tag 'block-5.14-2021-08-13' of git://git.kernel.dk/linux-block:
        nbd: Aovid double completion of a request
        blk-mq: clear active_queues before clearing BLK_MQ_F_TAG_QUEUE_SHARED
        Revert "block/mq-deadline: Add cgroup support"
        blk-iocost: fix lockdep warning on blkcg->lock
      020efdad
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.14-2021-08-13' of git://git.kernel.dk/linux-block · 42995cee
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A bit bigger than the previous weeks, but mostly just a few stable
        bound fixes. In detail:
      
         - Followup fixes to patches from last week for io-wq, turns out they
           weren't complete (Hao)
      
         - Two lockdep reported fixes out of the RT camp (me)
      
         - Sync the io_uring-cp example with liburing, as a few bug fixes
           never made it to the kernel carried version (me)
      
         - SQPOLL related TIF_NOTIFY_SIGNAL fix (Nadav)
      
         - Use WRITE_ONCE() when writing sq flags (Nadav)
      
         - io_rsrc_put_work() deadlock fix (Pavel)"
      
      * tag 'io_uring-5.14-2021-08-13' of git://git.kernel.dk/linux-block:
        tools/io_uring/io_uring-cp: sync with liburing example
        io_uring: fix ctx-exit io_rsrc_put_work() deadlock
        io_uring: drop ctx->uring_lock before flushing work item
        io-wq: fix IO_WORKER_F_FIXED issue in create_io_worker()
        io-wq: fix bug of creating io-wokers unconditionally
        io_uring: rsrc ref lock needs to be IRQ safe
        io_uring: Use WRITE_ONCE() when writing to sq_flags
        io_uring: clear TIF_NOTIFY_SIGNAL when running task work
      42995cee
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 462938cd
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "An assortment of pin control fixes of varying importance, the most
        important ones affecting Intel and AMD laptops turned up the recent
        few days so it's time to push this to your tree.
      
         - Fix the Kconfig dependency for Qualcomm SM8350 pin controller
      
         - Fix pin biasing fallback behaviour on the Mediatek pin controller
      
         - Fix the GPIO numbering scheme for Intel Tiger Lake-H to correspond
           to the products that are now actually out on the market
      
         - Fix a pin control function itemization in the Sunxi driver
           out-of-bounds access bug
      
         - Fix disable clocking for the RISC-V K210 pin controller on the
           errorpath
      
         - Fix a system shutdown bug affecting AMD Ryzen-based laptops, the
           system would not suspend but just bounce back up"
      
      * tag 'pinctrl-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: amd: Fix an issue with shutdown when system set to s0ix
        pinctrl: k210: Fix k210_fpioa_probe()
        pinctrl: sunxi: Don't underestimate number of functions
        pinctrl: tigerlake: Fix GPIO mapping for newer version of software
        pinctrl: mediatek: Fix fallback behavior for bias_set_combo
        pinctrl: qcom: fix GPIOLIB dependencies
      462938cd
    • Xie Yongji's avatar
      nbd: Aovid double completion of a request · cddce011
      Xie Yongji authored
      There is a race between iterating over requests in
      nbd_clear_que() and completing requests in recv_work(),
      which can lead to double completion of a request.
      
      To fix it, flush the recv worker before iterating over
      the requests and don't abort the completed request
      while iterating.
      
      Fixes: 96d97e17 ("nbd: clear_sock on netlink disconnect")
      Reported-by: default avatarJiang Yadong <jiangyadong@bytedance.com>
      Signed-off-by: default avatarXie Yongji <xieyongji@bytedance.com>
      Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Link: https://lore.kernel.org/r/20210813151330.96-1-xieyongji@bytedance.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cddce011
    • Jens Axboe's avatar
      tools/io_uring/io_uring-cp: sync with liburing example · 8f40d037
      Jens Axboe authored
      This example is missing a few fixes that are in the liburing version,
      synchronize with the upstream version.
      Reported-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8f40d037
    • Yu Kuai's avatar
      blk-mq: clear active_queues before clearing BLK_MQ_F_TAG_QUEUE_SHARED · 454bb677
      Yu Kuai authored
      We run a test that delete and recover devcies frequently(two devices on
      the same host), and we found that 'active_queues' is super big after a
      period of time.
      
      If device a and device b share a tag set, and a is deleted, then
      blk_mq_exit_queue() will clear BLK_MQ_F_TAG_QUEUE_SHARED because there
      is only one queue that are using the tag set. However, if b is still
      active, the active_queues of b might never be cleared even if b is
      deleted.
      
      Thus clear active_queues before BLK_MQ_F_TAG_QUEUE_SHARED is cleared.
      Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
      Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20210731062130.1533893-1-yukuai3@huawei.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      454bb677
    • Linus Torvalds's avatar
      Merge tag 'net-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · f8e6dfc6
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes, including fixes from netfilter, bpf, can and
        ieee802154.
      
        The size of this is pretty normal, but we got more fixes for 5.14
        changes this week than last week. Nothing major but the trend is the
        opposite of what we like. We'll see how the next week goes..
      
        Current release - regressions:
      
         - r8169: fix ASPM-related link-up regressions
      
         - bridge: fix flags interpretation for extern learn fdb entries
      
         - phy: micrel: fix link detection on ksz87xx switch
      
         - Revert "tipc: Return the correct errno code"
      
         - ptp: fix possible memory leak caused by invalid cast
      
        Current release - new code bugs:
      
         - bpf: add missing bpf_read_[un]lock_trace() for syscall program
      
         - bpf: fix potentially incorrect results with bpf_get_local_storage()
      
         - page_pool: mask the page->signature before the checking, avoid dma
           mapping leaks
      
         - netfilter: nfnetlink_hook: 5 fixes to information in netlink dumps
      
         - bnxt_en: fix firmware interface issues with PTP
      
         - mlx5: Bridge, fix ageing time
      
        Previous releases - regressions:
      
         - linkwatch: fix failure to restore device state across
           suspend/resume
      
         - bareudp: fix invalid read beyond skb's linear data
      
        Previous releases - always broken:
      
         - bpf: fix integer overflow involving bucket_size
      
         - ppp: fix issues when desired interface name is specified via
           netlink
      
         - wwan: mhi_wwan_ctrl: fix possible deadlock
      
         - dsa: microchip: ksz8795: fix number of VLAN related bugs
      
         - dsa: drivers: fix broken backpressure in .port_fdb_dump
      
         - dsa: qca: ar9331: make proper initial port defaults
      
        Misc:
      
         - bpf: add lockdown check for probe_write_user helper
      
         - netfilter: conntrack: remove offload_pickup sysctl before 5.14 is
           out
      
         - netfilter: conntrack: collect all entries in one cycle,
           heuristically slow down garbage collection scans on idle systems to
           prevent frequent wake ups"
      
      * tag 'net-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (87 commits)
        vsock/virtio: avoid potential deadlock when vsock device remove
        wwan: core: Avoid returning NULL from wwan_create_dev()
        net: dsa: sja1105: unregister the MDIO buses during teardown
        Revert "tipc: Return the correct errno code"
        net: mscc: Fix non-GPL export of regmap APIs
        net: igmp: increase size of mr_ifc_count
        MAINTAINERS: switch to my OMP email for Renesas Ethernet drivers
        tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets
        net: pcs: xpcs: fix error handling on failed to allocate memory
        net: linkwatch: fix failure to restore device state across suspend/resume
        net: bridge: fix memleak in br_add_if()
        net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge
        net: bridge: fix flags interpretation for extern learn fdb entries
        net: dsa: sja1105: fix broken backpressure in .port_fdb_dump
        net: dsa: lantiq: fix broken backpressure in .port_fdb_dump
        net: dsa: lan9303: fix broken backpressure in .port_fdb_dump
        net: dsa: hellcreek: fix broken backpressure in .port_fdb_dump
        bpf, core: Fix kernel-doc notation
        net: igmp: fix data-race in igmp_ifc_timer_expire()
        net: Fix memory leak in ieee802154_raw_deliver
        ...
      f8e6dfc6
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.14-rc6' of git://github.com/ceph/ceph-client · 3a03c67d
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "A patch to avoid a soft lockup in ceph_check_delayed_caps() from Luis
        and a reference handling fix from Jeff that should address some memory
        corruption reports in the snaprealm area.
      
        Both marked for stable"
      
      * tag 'ceph-for-5.14-rc6' of git://github.com/ceph/ceph-client:
        ceph: take snap_empty_lock atomically with snaprealm refcount change
        ceph: reduce contention in ceph_check_delayed_caps()
      3a03c67d
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2021-08-13' of git://anongit.freedesktop.org/drm/drm · 82cce5f4
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Another week, another set of pretty regular fixes, nothing really
        stands out too much.
      
        amdgpu:
         - Yellow carp update
         - RAS EEPROM fixes
         - BACO/BOCO fixes
         - Fix a memory leak in an error path
         - Freesync fix
         - VCN harvesting fix
         - Display fixes
      
        i915:
         - GVT fix for Windows VM hang.
         - Display fix of 12 BPC bits for display 12 and newer.
         - Don't try to access some media register for fused off domains.
         - Fix kerneldoc build warnings.
      
        mediatek:
         - Fix dpi bridge bug.
         - Fix cursor plane no update.
      
        meson:
         - Fix colors when booting with HDR"
      
      * tag 'drm-fixes-2021-08-13' of git://anongit.freedesktop.org/drm/drm:
        drm/doc/rfc: drop lmem uapi section
        drm/i915: Only access SFC_DONE when media domain is not fused off
        drm/i915/display: Fix the 12 BPC bits for PIPE_MISC reg
        drm/amd/display: use GFP_ATOMIC in amdgpu_dm_irq_schedule_work
        drm/amd/display: Remove invalid assert for ODM + MPC case
        drm/amd/pm: bug fix for the runtime pm BACO
        drm/amdgpu: handle VCN instances when harvesting (v2)
        drm/meson: fix colour distortion from HDR set during vendor u-boot
        drm/i915/gvt: Fix cached atomics setting for Windows VM
        drm/amdgpu: Add preferred mode in modeset when freesync video mode's enabled.
        drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'
        drm/amdgpu: don't enable baco on boco platforms in runpm
        drm/amdgpu: set RAS EEPROM address from VBIOS
        drm/amd/pm: update smu v13.0.1 firmware header
        drm/mediatek: Fix cursor plane no update
        drm/mediatek: mtk-dpi: Set out_fmt from config if not the last bridge
        drm/mediatek: dpi: Fix NULL dereference in mtk_dpi_bridge_atomic_check
      82cce5f4
  2. 12 Aug, 2021 17 commits
  3. 11 Aug, 2021 12 commits
  4. 10 Aug, 2021 2 commits
    • Yang Yingliang's avatar
      net: bridge: fix memleak in br_add_if() · 519133de
      Yang Yingliang authored
      I got a memleak report:
      
      BUG: memory leak
      unreferenced object 0x607ee521a658 (size 240):
      comm "syz-executor.0", pid 955, jiffies 4294780569 (age 16.449s)
      hex dump (first 32 bytes, cpu 1):
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
      backtrace:
      [<00000000d830ea5a>] br_multicast_add_port+0x1c2/0x300 net/bridge/br_multicast.c:1693
      [<00000000274d9a71>] new_nbp net/bridge/br_if.c:435 [inline]
      [<00000000274d9a71>] br_add_if+0x670/0x1740 net/bridge/br_if.c:611
      [<0000000012ce888e>] do_set_master net/core/rtnetlink.c:2513 [inline]
      [<0000000012ce888e>] do_set_master+0x1aa/0x210 net/core/rtnetlink.c:2487
      [<0000000099d1cafc>] __rtnl_newlink+0x1095/0x13e0 net/core/rtnetlink.c:3457
      [<00000000a01facc0>] rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3488
      [<00000000acc9186c>] rtnetlink_rcv_msg+0x369/0xa10 net/core/rtnetlink.c:5550
      [<00000000d4aabb9c>] netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2504
      [<00000000bc2e12a3>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
      [<00000000bc2e12a3>] netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1340
      [<00000000e4dc2d0e>] netlink_sendmsg+0x789/0xc70 net/netlink/af_netlink.c:1929
      [<000000000d22c8b3>] sock_sendmsg_nosec net/socket.c:654 [inline]
      [<000000000d22c8b3>] sock_sendmsg+0x139/0x170 net/socket.c:674
      [<00000000e281417a>] ____sys_sendmsg+0x658/0x7d0 net/socket.c:2350
      [<00000000237aa2ab>] ___sys_sendmsg+0xf8/0x170 net/socket.c:2404
      [<000000004f2dc381>] __sys_sendmsg+0xd3/0x190 net/socket.c:2433
      [<0000000005feca6c>] do_syscall_64+0x37/0x90 arch/x86/entry/common.c:47
      [<000000007304477d>] entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      On error path of br_add_if(), p->mcast_stats allocated in
      new_nbp() need be freed, or it will be leaked.
      
      Fixes: 1080ab95 ("net: bridge: add support for IGMP/MLD stats and export them via netlink")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Link: https://lore.kernel.org/r/20210809132023.978546-1-yangyingliang@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      519133de
    • Vladimir Oltean's avatar
      net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by... · c35b57ce
      Vladimir Oltean authored
      net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge
      
      The blamed commit added a new field to struct switchdev_notifier_fdb_info,
      but did not make sure that all call paths set it to something valid.
      For example, a switchdev driver may emit a SWITCHDEV_FDB_ADD_TO_BRIDGE
      notifier, and since the 'is_local' flag is not set, it contains junk
      from the stack, so the bridge might interpret those notifications as
      being for local FDB entries when that was not intended.
      
      To avoid that now and in the future, zero-initialize all
      switchdev_notifier_fdb_info structures created by drivers such that all
      newly added fields to not need to touch drivers again.
      
      Fixes: 2c4eca3e ("net: bridge: switchdev: include local flag in FDB notifications")
      Reported-by: default avatarIdo Schimmel <idosch@idosch.org>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Tested-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Reviewed-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Link: https://lore.kernel.org/r/20210810115024.1629983-1-vladimir.oltean@nxp.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c35b57ce