1. 11 Nov, 2022 31 commits
  2. 10 Nov, 2022 9 commits
    • Florian Fainelli's avatar
      MAINTAINERS: Move Vivien to CREDITS · 6ce3df59
      Florian Fainelli authored
      Last patch from Vivien was nearly 3 years ago and he has not reviewed or
      responded to DSA patches since then, move to CREDITS.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20221109231907.621678-1-f.fainelli@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6ce3df59
    • Jakub Kicinski's avatar
      genetlink: fix single op policy dump when do is present · c1b05105
      Jakub Kicinski authored
      Jonathan reports crashes when running net-next in Meta's fleet.
      Stats collection uses ethtool -I which does a per-op policy dump
      to check if stats are supported. We don't initialize the dumpit
      information if doit succeeds due to evaluation short-circuiting.
      
      The crash may look like this:
      
         BUG: kernel NULL pointer dereference, address: 0000000000000cc0
         RIP: 0010:netlink_policy_dump_add_policy+0x174/0x2a0
           ctrl_dumppolicy_start+0x19f/0x2f0
           genl_start+0xe7/0x140
      
      Or we may trigger a warning:
      
         WARNING: CPU: 1 PID: 785 at net/netlink/policy.c:87 netlink_policy_dump_get_policy_idx+0x79/0x80
         RIP: 0010:netlink_policy_dump_get_policy_idx+0x79/0x80
           ctrl_dumppolicy_put_op+0x214/0x360
      
      depending on what garbage we pick up from the stack.
      Reported-by: default avatarJonathan Lemon <bsd@meta.com>
      Fixes: 26588edb ("genetlink: support split policies in ctrl_dumppolicy_put_op()")
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Link: https://lore.kernel.org/r/20221109183254.554051-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c1b05105
    • Ido Schimmel's avatar
      devlink: Fix warning when unregistering a port · 1fb22ed6
      Ido Schimmel authored
      When a devlink port is unregistered, its type is expected to be unset or
      otherwise a WARNING is generated [1]. This was supposed to be handled by
      cited commit by clearing the type upon 'NETDEV_PRE_UNINIT'.
      
      The assumption was that no other events can be generated for the netdev
      after this event, but this proved to be wrong. After the event is
      generated, netdev_wait_allrefs_any() will rebroadcast a
      'NETDEV_UNREGISTER' until the netdev's reference count drops to 1. This
      causes devlink to set the port type back to Ethernet.
      
      Fix by only setting and clearing the port type upon 'NETDEV_POST_INIT'
      and 'NETDEV_PRE_UNINIT', respectively. For all other events, preserve
      the port type.
      
      [1]
      WARNING: CPU: 0 PID: 11 at net/core/devlink.c:9998 devl_port_unregister+0x2f6/0x390 net/core/devlink.c:9998
      Modules linked in:
      CPU: 1 PID: 11 Comm: kworker/u4:1 Not tainted 6.1.0-rc3-next-20221107-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
      Workqueue: netns cleanup_net
      RIP: 0010:devl_port_unregister+0x2f6/0x390 net/core/devlink.c:9998
      [...]
      Call Trace:
       <TASK>
       __nsim_dev_port_del+0x1bb/0x240 drivers/net/netdevsim/dev.c:1433
       nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1443 [inline]
       nsim_dev_reload_destroy+0x171/0x510 drivers/net/netdevsim/dev.c:1660
       nsim_dev_reload_down+0x6b/0xd0 drivers/net/netdevsim/dev.c:968
       devlink_reload+0x1c2/0x6b0 net/core/devlink.c:4501
       devlink_pernet_pre_exit+0x104/0x1c0 net/core/devlink.c:12609
       ops_pre_exit_list net/core/net_namespace.c:159 [inline]
       cleanup_net+0x451/0xb10 net/core/net_namespace.c:594
       process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289
       worker_thread+0x665/0x1080 kernel/workqueue.c:2436
       kthread+0x2e4/0x3a0 kernel/kthread.c:376
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
       </TASK>
      
      Fixes: 02a68a47 ("net: devlink: track netdev with devlink_port assigned")
      Reported-by: syzbot+85e47e1a08b3e159b159@syzkaller.appspotmail.com
      Reported-by: syzbot+c2ca18f0fccdd1f09c66@syzkaller.appspotmail.com
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Link: https://lore.kernel.org/r/20221110085150.520800-1-idosch@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1fb22ed6
    • Jakub Kicinski's avatar
      Merge branch 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 79b0872b
      Jakub Kicinski authored
      Long Li says:
      
      ====================
      Introduce Microsoft Azure Network Adapter (MANA) RDMA driver [netdev prep]
      
      The first 11 patches which modify the MANA Ethernet driver to support
      RDMA driver.
      
      * 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        net: mana: Define data structures for protection domain and memory registration
        net: mana: Define data structures for allocating doorbell page from GDMA
        net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES
        net: mana: Define max values for SGL entries
        net: mana: Move header files to a common location
        net: mana: Record port number in netdev
        net: mana: Export Work Queue functions for use by RDMA driver
        net: mana: Set the DMA device max segment size
        net: mana: Handle vport sharing between devices
        net: mana: Record the physical address for doorbell page region
        net: mana: Add support for auxiliary device
      ====================
      
      Link: https://lore.kernel.org/all/1667502990-2559-1-git-send-email-longli@linuxonhyperv.com/Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      79b0872b
    • Vincent Mailhol's avatar
      ethtool: ethtool_get_drvinfo: populate drvinfo fields even if callback exits · edaf5df2
      Vincent Mailhol authored
      If ethtool_ops::get_drvinfo() callback isn't set,
      ethtool_get_drvinfo() will fill the ethtool_drvinfo::name and
      ethtool_drvinfo::bus_info fields.
      
      However, if the driver provides the callback function, those two
      fields are not touched. This means that the driver has to fill these
      itself.
      
      Allow the driver to leave those two fields empty and populate them in
      such case. This way, the driver can rely on the default values for the
      name and the bus_info. If the driver provides values, do nothing.
      Signed-off-by: default avatarVincent Mailhol <mailhol.vincent@wanadoo.fr>
      Link: https://lore.kernel.org/r/20221108035754.2143-1-mailhol.vincent@wanadoo.frSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      edaf5df2
    • Linus Torvalds's avatar
      Merge tag 'for-6.1-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 1767a722
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - revert memory optimization for scrub blocks, this misses errors in
         2nd and following blocks
      
       - add exception for ENOMEM as reason for transaction abort to not print
         stack trace, syzbot has reported many
      
       - zoned fixes:
            - fix locking imbalance during scrub
            - initialize zones for seeding device
            - initialize zones for cloned device structures
      
       - when looking up device, change assertion to a real check as some of
         the search parameters can be passed by ioctl, reported by syzbot
      
       - fix error pointer check in self tests
      
      * tag 'for-6.1-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: zoned: fix locking imbalance on scrub
        btrfs: zoned: initialize device's zone info for seeding
        btrfs: zoned: clone zoned device info when cloning a device
        Revert "btrfs: scrub: use larger block size for data extent scrub"
        btrfs: don't print stack trace when transaction is aborted due to ENOMEM
        btrfs: selftests: fix wrong error check in btrfs_free_dummy_root()
        btrfs: fix match incorrectly in dev_args_match_device
      1767a722
    • Linus Torvalds's avatar
      Merge tag 'soundwire-6.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire · f014699c
      Linus Torvalds authored
      Pull soundwire fixes from Vinod Koul:
       "Two qcom driver fixes for broadcast completion reinit and check for
        outanding writes. And a lone Intel driver fix for clock stop timeout"
      
      * tag 'soundwire-6.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
        soundwire: qcom: check for outanding writes before doing a read
        soundwire: qcom: reinit broadcast completion
        soundwire: intel: Initialize clock stop timeout
      f014699c
    • Linus Torvalds's avatar
      Merge tag 'phy-fixes-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy · 8395ee62
      Linus Torvalds authored
      Pull phy fixes from Vinod Koul:
       "A bunch of odd driver fixes and a MAINTAINER email update:
      
         - Update Kishon's email
      
         - stms32 error code fix in driver probe
      
         - tegra: fix for checking valid pointer
      
         - qcom_qmp: null deref fix
      
         - sunplus: error check fix
      
         - ralink: add missing sentinel to table"
      
      * tag 'phy-fixes-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
        phy: ralink: mt7621-pci: add sentinel to quirks table
        phy: sunplus: Fix an IS_ERR() vs NULL bug in sp_usb_phy_probe
        phy: qcom-qmp-combo: fix NULL-deref on runtime resume
        phy: tegra: xusb: Fix crash during pad power on/down
        phy: stm32: fix an error code in probe
        MAINTAINERS: Update Kishon's email address in GENERIC PHY FRAMEWORK
      8395ee62
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 17922865
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "I apparently had missed tagging and sending this set of changes out
        during the 6.1 merge window. But did get the associated dts changes
        depending on this merged. The result is a regression in 6.1-rc on the
        affected, older, Qualcomm platforms - in for form of them not booting.
      
        So while these weren't regression fixes originally, they are now. It's
        not introducing new beahavior, but simply extending the existing new
        Devicetree model, to cover remaining platforms:
      
         - extend the DeviceTree binding and implementation for the Qualcomm
           hardware spinlock on some older platforms to follow the style of
           the newer ones where the DeviceTree representation does not rely on
           an intermediate syscon node"
      
      * tag 'hwlock-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        dt-bindings: hwlock: qcom-hwspinlock: add syscon to MSM8974
        hwspinlock: qcom: add support for MMIO on older SoCs
        hwspinlock: qcom: correct MMIO max register for newer SoCs
        dt-bindings: hwlock: qcom-hwspinlock: correct example indentation
        dt-bindings: hwlock: qcom-hwspinlock: add support for MMIO on older SoCs
      17922865