1. 15 Aug, 2024 18 commits
  2. 14 Aug, 2024 10 commits
  3. 13 Aug, 2024 6 commits
  4. 12 Aug, 2024 6 commits
    • Zheng Zhang's avatar
      net: ethernet: mtk_wed: fix use-after-free panic in mtk_wed_setup_tc_block_cb() · db1b4bed
      Zheng Zhang authored
      When there are multiple ap interfaces on one band and with WED on,
      turning the interface down will cause a kernel panic on MT798X.
      
      Previously, cb_priv was freed in mtk_wed_setup_tc_block() without
      marking NULL,and mtk_wed_setup_tc_block_cb() didn't check the value, too.
      
      Assign NULL after free cb_priv in mtk_wed_setup_tc_block() and check NULL
      in mtk_wed_setup_tc_block_cb().
      
      ----------
      Unable to handle kernel paging request at virtual address 0072460bca32b4f5
      Call trace:
       mtk_wed_setup_tc_block_cb+0x4/0x38
       0xffffffc0794084bc
       tcf_block_playback_offloads+0x70/0x1e8
       tcf_block_unbind+0x6c/0xc8
      ...
      ---------
      
      Fixes: 79968444 ("net: ethernet: mtk_wed: introduce wed wo support")
      Signed-off-by: default avatarZheng Zhang <everything411@qq.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db1b4bed
    • Haiyang Zhang's avatar
      net: mana: Fix RX buf alloc_size alignment and atomic op panic · 32316f67
      Haiyang Zhang authored
      The MANA driver's RX buffer alloc_size is passed into napi_build_skb() to
      create SKB. skb_shinfo(skb) is located at the end of skb, and its alignment
      is affected by the alloc_size passed into napi_build_skb(). The size needs
      to be aligned properly for better performance and atomic operations.
      Otherwise, on ARM64 CPU, for certain MTU settings like 4000, atomic
      operations may panic on the skb_shinfo(skb)->dataref due to alignment fault.
      
      To fix this bug, add proper alignment to the alloc_size calculation.
      
      Sample panic info:
      [  253.298819] Unable to handle kernel paging request at virtual address ffff000129ba5cce
      [  253.300900] Mem abort info:
      [  253.301760]   ESR = 0x0000000096000021
      [  253.302825]   EC = 0x25: DABT (current EL), IL = 32 bits
      [  253.304268]   SET = 0, FnV = 0
      [  253.305172]   EA = 0, S1PTW = 0
      [  253.306103]   FSC = 0x21: alignment fault
      Call trace:
       __skb_clone+0xfc/0x198
       skb_clone+0x78/0xe0
       raw6_local_deliver+0xfc/0x228
       ip6_protocol_deliver_rcu+0x80/0x500
       ip6_input_finish+0x48/0x80
       ip6_input+0x48/0xc0
       ip6_sublist_rcv_finish+0x50/0x78
       ip6_sublist_rcv+0x1cc/0x2b8
       ipv6_list_rcv+0x100/0x150
       __netif_receive_skb_list_core+0x180/0x220
       netif_receive_skb_list_internal+0x198/0x2a8
       __napi_poll+0x138/0x250
       net_rx_action+0x148/0x330
       handle_softirqs+0x12c/0x3a0
      
      Cc: stable@vger.kernel.org
      Fixes: 80f6215b ("net: mana: Add support for jumbo frame")
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Reviewed-by: default avatarLong Li <longli@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32316f67
    • Frank Li's avatar
      dt-bindings: net: fsl,qoriq-mc-dpmac: add missed property phys · c25504a0
      Frank Li authored
      Add missed property phys, which indicate how connect to serdes phy.
      Fix below warning:
      arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dtb: fsl-mc@80c000000: dpmacs:ethernet@7: Unevaluated properties are not allowed ('phys' was unexpected)
      Signed-off-by: default avatarFrank Li <Frank.Li@nxp.com>
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c25504a0
    • David S. Miller's avatar
      Merge branch 'vsc73xx-fix-mdio-and-phy' · 1fc20219
      David S. Miller authored
      Pawel Dembicki says:
      
      ====================
      net: dsa: vsc73xx: fix MDIO bus access and PHY opera
      
      This series are extracted patches from net-next series [0].
      
      The VSC73xx driver has issues with PHY configuration. This patch series
      fixes most of them.
      
      The first patch synchronizes the register configuration routine with the
      datasheet recommendations.
      
      Patches 2-3 restore proper communication on the MDIO bus. Currently,
      the write value isn't sent to the MDIO register, and without a busy check,
      communication with the PHY can be interrupted. This causes the PHY to
      receive improper configuration and autonegotiation could fail.
      
      The fourth patch removes the PHY reset blockade, as it is no longer
      required.
      
      After fixing the MDIO operations, autonegotiation became possible.
      The last patch removes the blockade, which became unnecessary after
      the MDIO operations fix.
      
      [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=874739&state=%2A&archive=both
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1fc20219
    • Pawel Dembicki's avatar
      net: phy: vitesse: repair vsc73xx autonegotiation · de7a670f
      Pawel Dembicki authored
      When the vsc73xx mdio bus work properly, the generic autonegotiation
      configuration works well.
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de7a670f
    • Pawel Dembicki's avatar
      net: dsa: vsc73xx: allow phy resetting · 9f9a7265
      Pawel Dembicki authored
      Resetting the VSC73xx PHY was problematic because the MDIO bus, without
      a busy check, read and wrote incorrect register values.
      
      My investigation indicates that resetting the PHY only triggers changes
      in configuration. However, improper register values written earlier
      were only exposed after a soft reset.
      
      The reset itself wasn't the issue; rather, the problem stemmed from
      incorrect read and write operations.
      
      A 'soft_reset' can now proceed normally. There are no reasons to keep
      the VSC73xx from being reset.
      
      This commit removes the reset blockade in the 'vsc73xx_phy_write'
      function.
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f9a7265