1. Aug 10, 2022
    • Florian Westphal's avatar
      plip: avoid rcu debug splat · bc3c8fe3
      Florian Westphal authored
      WARNING: suspicious RCU usage
      5.2.0-rc2-00605-g2638eb8b #1 Not tainted
      drivers/net/plip/plip.c:1110 suspicious rcu_dereference_check() usage!
      
      plip_open is called with RTNL held, switch to the correct helper.
      
      Fixes: 2638eb8b
      
       ("net: ipv4: provide __rcu annotation for ifa_list")
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Link: https://lore.kernel.org/r/20220807115304.13257-1-fw@strlen.de
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bc3c8fe3
    • Sandor Bodo-Merle's avatar
      net: bgmac: Fix a BUG triggered by wrong bytes_compl · 1b7680c6
      Sandor Bodo-Merle authored
      On one of our machines we got:
      
      kernel BUG at lib/dynamic_queue_limits.c:27!
      Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
      CPU: 0 PID: 1166 Comm: irq/41-bgmac Tainted: G        W  O    4.14.275-rt132 #1
      Hardware name: BRCM XGS iProc
      task: ee3415c0 task.stack: ee32a000
      PC is at dql_completed+0x168/0x178
      LR is at bgmac_poll+0x18c/0x6d8
      pc : [<c03b9430>]    lr : [<c04b5a18>]    psr: 800a0313
      sp : ee32be14  ip : 000005ea  fp : 00000bd4
      r10: ee558500  r9 : c0116298  r8 : 00000002
      r7 : 00000000  r6 : ef128810  r5 : 01993267  r4 : 01993851
      r3 : ee558000  r2 : 000070e1  r1 : 00000bd4  r0 : ee52c180
      Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      Control: 12c5387d  Table: 8e88c04a  DAC: 00000051
      Process irq/41-bgmac (pid: 1166, stack limit = 0xee32a210)
      Stack: (0xee32be14 to 0xee32c000)
      be00:                                              ee558520 ee52c100 ef128810
      be20: 00000000 00000002 c0116298 c04b5a18 00000000 c0a0c8c4 c0951780 00000040
      be40: c0701780 ee558500 ee55d520 ef05b340 ef6f9780 ee558520 00000001 00000040
      be60: ffffe000 c0a56878 ef6fa040 c0952040 0000012c c0528744 ef6f97b0 fffcfb6a
      be80: c0a04104 2eda8000 c0a0c4ec c0a0d368 ee32bf44 c0153534 ee32be98 ee32be98
      bea0: ee32bea0 ee32bea0 ee32bea8 ee32bea8 00000000 c01462e4 ffffe000 ef6f22a8
      bec0: ffffe000 00000008 ee32bee4 c0147430 ffffe000 c094a2a8 00000003 ffffe000
      bee0: c0a54528 00208040 0000000c c0a0c8c4 c0a65980 c0124d3c 00000008 ee558520
      bf00: c094a23c c0a02080 00000000 c07a9910 ef136970 ef136970 ee30a440 ef136900
      bf20: ee30a440 00000001 ef136900 ee30a440 c016d990 00000000 c0108db0 c012500c
      bf40: ef136900 c016da14 ee30a464 ffffe000 00000001 c016dd14 00000000 c016db28
      bf60: ffffe000 ee21a080 ee30a400 00000000 ee32a000 ee30a440 c016dbfc ee25fd70
      bf80: ee21a09c c013edcc ee32a000 ee30a400 c013ec7c 00000000 00000000 00000000
      bfa0: 00000000 00000000 00000000 c0108470 00000000 00000000 00000000 00000000
      bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
      [<c03b9430>] (dql_completed) from [<c04b5a18>] (bgmac_poll+0x18c/0x6d8)
      [<c04b5a18>] (bgmac_poll) from [<c0528744>] (net_rx_action+0x1c4/0x494)
      [<c0528744>] (net_rx_action) from [<c0124d3c>] (do_current_softirqs+0x1ec/0x43c)
      [<c0124d3c>] (do_current_softirqs) from [<c012500c>] (__local_bh_enable+0x80/0x98)
      [<c012500c>] (__local_bh_enable) from [<c016da14>] (irq_forced_thread_fn+0x84/0x98)
      [<c016da14>] (irq_forced_thread_fn) from [<c016dd14>] (irq_thread+0x118/0x1c0)
      [<c016dd14>] (irq_thread) from [<c013edcc>] (kthread+0x150/0x158)
      [<c013edcc>] (kthread) from [<c0108470>] (ret_from_fork+0x14/0x24)
      Code: a83f15e0 0200001a 0630a0e1 c3ffffea (f201f0e7)
      
      The issue seems similar to commit 90b3b339 ("net: hisilicon: Fix a BUG
      trigered by wrong bytes_compl") and potentially introduced by commit
      b38c83dd ("bgmac: simplify tx ring index handling").
      
      If there is an RX interrupt between setting ring->end
      and netdev_sent_queue() we can hit the BUG_ON as bgmac_dma_tx_free()
      can miscalculate the queue size while called from bgmac_poll().
      
      The machine which triggered the BUG runs a v4.14 RT kernel - but the issue
      seems present in mainline too.
      
      Fixes: b38c83dd
      
       ("bgmac: simplify tx ring index handling")
      Signed-off-by: default avatarSandor Bodo-Merle <sbodomerle@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20220808173939.193804-1-sbodomerle@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1b7680c6
    • Vladimir Oltean's avatar
      net: dsa: felix: suppress non-changes to the tagging protocol · 4c46bb49
      Vladimir Oltean authored
      The way in which dsa_tree_change_tag_proto() works is that when
      dsa_tree_notify() fails, it doesn't know whether the operation failed
      mid way in a multi-switch tree, or it failed for a single-switch tree.
      So even though drivers need to fail cleanly in
      ds->ops->change_tag_protocol(), DSA will still call dsa_tree_notify()
      again, to restore the old tag protocol for potential switches in the
      tree where the change did succeeed (before failing for others).
      
      This means for the felix driver that if we report an error in
      felix_change_tag_protocol(), we'll get another call where proto_ops ==
      old_proto_ops. If we proceed to act upon that, we may do unexpected
      things. For example, we will call dsa_tag_8021q_register() twice in a
      row, without any dsa_tag_8021q_unregister() in between. Then we will
      actually call dsa_tag_8021q_unregister() via old_proto_ops->teardown,
      which (if it manages to run at all, after walking through corrupted data
      structures) will leave the ports inoperational anyway.
      
      The bug can be readily reproduced if we force an error while in
      tag_8021q mode; this crashes the kernel.
      
      echo ocelot-8021q > /sys/class/net/eno2/dsa/tagging
      echo edsa > /sys/class/net/eno2/dsa/tagging # -EPROTONOSUPPORT
      
      Unable to handle kernel NULL pointer dereference at virtual address 0000000000000014
      Call trace:
       vcap_entry_get+0x24/0x124
       ocelot_vcap_filter_del+0x198/0x270
       felix_tag_8021q_vlan_del+0xd4/0x21c
       dsa_switch_tag_8021q_vlan_del+0x168/0x2cc
       dsa_switch_event+0x68/0x1170
       dsa_tree_notify+0x14/0x34
       dsa_port_tag_8021q_vlan_del+0x84/0x110
       dsa_tag_8021q_unregister+0x15c/0x1c0
       felix_tag_8021q_teardown+0x16c/0x180
       felix_change_tag_protocol+0x1bc/0x230
       dsa_switch_event+0x14c/0x1170
       dsa_tree_change_tag_proto+0x118/0x1c0
      
      Fixes: 7a29d220
      
       ("net: dsa: felix: reimplement tagging protocol change with function pointers")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20220808125127.3344094-1-vladimir.oltean@nxp.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4c46bb49
    • Jakub Kicinski's avatar
      Merge tag 'wireless-2022-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless · 7ba0fa7f
      Jakub Kicinski authored
      Kalle Valo says:
      
      ====================
      wireless fixes for v6.0
      
      First set of fixes for v6.0. Small one this time, fix a cfg80211
      warning seen with brcmfmac and remove an unncessary inline keyword
      from wilc1000.
      
      * tag 'wireless-2022-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless:
        wifi: wilc1000: fix spurious inline in wilc_handle_disconnect()
        wifi: cfg80211: Fix validating BSS pointers in __cfg80211_connect_result
      ====================
      
      Link: https://lore.kernel.org/r/20220809164756.B1DAEC433D6@smtp.kernel.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7ba0fa7f
  2. Aug 09, 2022
  3. Aug 08, 2022
  4. Aug 06, 2022