Skip to content
  1. Feb 15, 2022
    • Oliver Neukum's avatar
      CDC-NCM: avoid overflow in sanity checking · 8d2b1a1e
      Oliver Neukum authored
      
      
      A broken device may give an extreme offset like 0xFFF0
      and a reasonable length for a fragment. In the sanity
      check as formulated now, this will create an integer
      overflow, defeating the sanity check. Both offset
      and offset + len need to be checked in such a manner
      that no overflow can occur.
      And those quantities should be unsigned.
      
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d2b1a1e
    • Tom Rix's avatar
      mctp: fix use after free · 7e5b6a5c
      Tom Rix authored
      Clang static analysis reports this problem
      route.c:425:4: warning: Use of memory after it is freed
        trace_mctp_key_acquire(key);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      When mctp_key_add() fails, key is freed but then is later
      used in trace_mctp_key_acquire().  Add an else statement
      to use the key only when mctp_key_add() is successful.
      
      Fixes: 4f9e1ba6
      
       ("mctp: Add tracepoints for tag/key handling")
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7e5b6a5c
    • Vladimir Oltean's avatar
      net: mscc: ocelot: fix use-after-free in ocelot_vlan_del() · ef576405
      Vladimir Oltean authored
      ocelot_vlan_member_del() will free the struct ocelot_bridge_vlan, so if
      this is the same as the port's pvid_vlan which we access afterwards,
      what we're accessing is freed memory.
      
      Fix the bug by determining whether to clear ocelot_port->pvid_vlan prior
      to calling ocelot_vlan_member_del().
      
      Fixes: d4004422
      
       ("net: mscc: ocelot: track the port pvid using a pointer")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef576405
    • Eric Dumazet's avatar
      bonding: fix data-races around agg_select_timer · 9ceaf6f7
      Eric Dumazet authored
      syzbot reported that two threads might write over agg_select_timer
      at the same time. Make agg_select_timer atomic to fix the races.
      
      BUG: KCSAN: data-race in bond_3ad_initiate_agg_selection / bond_3ad_state_machine_handler
      
      read to 0xffff8881242aea90 of 4 bytes by task 1846 on cpu 1:
       bond_3ad_state_machine_handler+0x99/0x2810 drivers/net/bonding/bond_3ad.c:2317
       process_one_work+0x3f6/0x960 kernel/workqueue.c:2307
       worker_thread+0x616/0xa70 kernel/workqueue.c:2454
       kthread+0x1bf/0x1e0 kernel/kthread.c:377
       ret_from_fork+0x1f/0x30
      
      write to 0xffff8881242aea90 of 4 bytes by task 25910 on cpu 0:
       bond_3ad_initiate_agg_selection+0x18/0x30 drivers/net/bonding/bond_3ad.c:1998
       bond_open+0x658/0x6f0 drivers/net/bonding/bond_main.c:3967
       __dev_open+0x274/0x3a0 net/core/dev.c:1407
       dev_open+0x54/0x190 net/core/dev.c:1443
       bond_enslave+0xcef/0x3000 drivers/net/bonding/bond_main.c:1937
       do_set_master net/core/rtnetlink.c:2532 [inline]
       do_setlink+0x94f/0x2500 net/core/rtnetlink.c:2736
       __rtnl_newlink net/core/rtnetlink.c:3414 [inline]
       rtnl_newlink+0xfeb/0x13e0 net/core/rtnetlink.c:3529
       rtnetlink_rcv_msg+0x745/0x7e0 net/core/rtnetlink.c:5594
       netlink_rcv_skb+0x14e/0x250 net/netlink/af_netlink.c:2494
       rtnetlink_rcv+0x18/0x20 net/core/rtnetlink.c:5612
       netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
       netlink_unicast+0x602/0x6d0 net/netlink/af_netlink.c:1343
       netlink_sendmsg+0x728/0x850 net/netlink/af_netlink.c:1919
       sock_sendmsg_nosec net/socket.c:705 [inline]
       sock_sendmsg net/socket.c:725 [inline]
       ____sys_sendmsg+0x39a/0x510 net/socket.c:2413
       ___sys_sendmsg net/socket.c:2467 [inline]
       __sys_sendmsg+0x195/0x230 net/socket.c:2496
       __do_sys_sendmsg net/socket.c:2505 [inline]
       __se_sys_sendmsg net/socket.c:2503 [inline]
       __x64_sys_sendmsg+0x42/0x50 net/socket.c:2503
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      value changed: 0x00000050 -> 0x0000004f
      
      Reported by Kernel Concurrency Sanitizer on:
      CPU: 0 PID: 25910 Comm: syz-executor.1 Tainted: G        W         5.17.0-rc4-syzkaller-dirty #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      
      Fixes: 1da177e4
      
       ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ceaf6f7
    • Radu Bulie's avatar
      dpaa2-eth: Initialize mutex used in one step timestamping path · 07dd4485
      Radu Bulie authored
      1588 Single Step Timestamping code path uses a mutex to
      enforce atomicity for two events:
      - update of ptp single step register
      - transmit ptp event packet
      
      Before this patch the mutex was not initialized. This
      caused unexpected crashes in the Tx function.
      
      Fixes: c5521189
      
       ("dpaa2-eth: support PTP Sync packet one-step timestamping")
      Signed-off-by: default avatarRadu Bulie <radu-andrei.bulie@nxp.com>
      Reviewed-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07dd4485
    • Tom Rix's avatar
      dpaa2-switch: fix default return of dpaa2_switch_flower_parse_mirror_key · 2a36ed7c
      Tom Rix authored
      Clang static analysis reports this representative problem
      dpaa2-switch-flower.c:616:24: warning: The right operand of '=='
        is a garbage value
        tmp->cfg.vlan_id == vlan) {
                         ^  ~~~~
      vlan is set in dpaa2_switch_flower_parse_mirror_key(). However
      this function can return success without setting vlan.  So
      change the default return to -EOPNOTSUPP.
      
      Fixes: 0f3faece
      
       ("dpaa2-switch: add VLAN based mirroring")
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Reviewed-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a36ed7c
    • Zhang Yunkai's avatar
      ipv4: add description about martian source · 9d2d38c3
      Zhang Yunkai authored
      
      
      When multiple containers are running in the environment and multiple
      macvlan network port are configured in each container, a lot of martian
      source prints will appear after martian_log is enabled. they are almost
      the same, and printed by net_warn_ratelimited. Each arp message will
      trigger this print on each network port.
      
      Such as:
      IPv4: martian source 173.254.95.16 from 173.254.100.109,
      on dev eth0
      ll header: 00000000: ff ff ff ff ff ff 40 00 ad fe 64 6d
      08 06        ......@...dm..
      IPv4: martian source 173.254.95.16 from 173.254.100.109,
      on dev eth1
      ll header: 00000000: ff ff ff ff ff ff 40 00 ad fe 64 6d
      08 06        ......@...dm..
      
      There is no description of this kind of source in the RFC1812.
      
      Signed-off-by: default avatarZhang Yunkai <zhang.yunkai@zte.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d2d38c3
    • Eric Dumazet's avatar
      crypto: af_alg - get rid of alg_memory_allocated · 25206111
      Eric Dumazet authored
      alg_memory_allocated does not seem to be really used.
      
      alg_proto does have a .memory_allocated field, but no
      corresponding .sysctl_mem.
      
      This means sk_has_account() returns true, but all sk_prot_mem_limits()
      users will trigger a NULL dereference [1].
      
      THis was not a problem until SO_RESERVE_MEM addition.
      
      general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN
      KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
      CPU: 1 PID: 3591 Comm: syz-executor153 Not tainted 5.17.0-rc3-syzkaller-00316-gb81b1829e7e3 #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:sk_prot_mem_limits include/net/sock.h:1523 [inline]
      RIP: 0010:sock_reserve_memory+0x1d7/0x330 net/core/sock.c:1000
      Code: 08 00 74 08 48 89 ef e8 27 20 bb f9 4c 03 7c 24 10 48 8b 6d 00 48 83 c5 08 48 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 ef e8 fb 1f bb f9 48 8b 6d 00 4c 89 ff 48
      RSP: 0018:ffffc90001f1fb68 EFLAGS: 00010202
      RAX: 0000000000000001 RBX: ffff88814aabc000 RCX: dffffc0000000000
      RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff90e18120
      RBP: 0000000000000008 R08: dffffc0000000000 R09: fffffbfff21c3025
      R10: fffffbfff21c3025 R11: 0000000000000000 R12: ffffffff8d109840
      R13: 0000000000001002 R14: 0000000000000001 R15: 0000000000000001
      FS:  0000555556e08300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007fc74416f130 CR3: 0000000073d9e000 CR4: 00000000003506e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       <TASK>
       sock_setsockopt+0x14a9/0x3a30 net/core/sock.c:1446
       __sys_setsockopt+0x5af/0x980 net/socket.c:2176
       __do_sys_setsockopt net/socket.c:2191 [inline]
       __se_sys_setsockopt net/socket.c:2188 [inline]
       __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2188
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      RIP: 0033:0x7fc7440fddc9
      Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
      RSP: 002b:00007ffe98f07968 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
      RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc7440fddc9
      RDX: 0000000000000049 RSI: 0000000000000001 RDI: 0000000000000004
      RBP: 0000000000000000 R08: 0000000000000004 R09: 00007ffe98f07990
      R10: 0000000020000000 R11: 0000000000000246 R12: 00007ffe98f0798c
      R13: 00007ffe98f079a0 R14: 00007ffe98f079e0 R15: 0000000000000000
       </TASK>
      Modules linked in:
      ---[ end trace 0000000000000000 ]---
      RIP: 0010:sk_prot_mem_limits include/net/sock.h:1523 [inline]
      RIP: 0010:sock_reserve_memory+0x1d7/0x330 net/core/sock.c:1000
      Code: 08 00 74 08 48 89 ef e8 27 20 bb f9 4c 03 7c 24 10 48 8b 6d 00 48 83 c5 08 48 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 ef e8 fb 1f bb f9 48 8b 6d 00 4c 89 ff 48
      RSP: 0018:ffffc90001f1fb68 EFLAGS: 00010202
      RAX: 0000000000000001 RBX: ffff88814aabc000 RCX: dffffc0000000000
      RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff90e18120
      RBP: 0000000000000008 R08: dffffc0000000000 R09: fffffbfff21c3025
      R10: fffffbfff21c3025 R11: 0000000000000000 R12: ffffffff8d109840
      R13: 0000000000001002 R14: 0000000000000001 R15: 0000000000000001
      FS:  0000555556e08300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007fc74416f130 CR3: 0000000073d9e000 CR4: 00000000003506e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      
      Fixes: 2bb2f5fb
      
       ("net: add new socket option SO_RESERVE_MEM")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Wei Wang <weiwan@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25206111
    • David S. Miller's avatar
      Merge tag 'ieee802154-for-net-2022-02-15' of... · b465c0dc
      David S. Miller authored
      Merge tag 'ieee802154-for-net-2022-02-15' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan
      
      
      
      Stefan Schmidt says:
      
      ====================
      Only a single fix this time.
      Miquel Raynal fixed the lifs/sifs periods in the ca82010 to take the actual
      symbol duration time into account.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b465c0dc
    • DENG Qingfang's avatar
      net: phy: mediatek: remove PHY mode check on MT7531 · 525b108e
      DENG Qingfang authored
      
      
      The function mt7531_phy_mode_supported in the DSA driver set supported
      mode to PHY_INTERFACE_MODE_GMII instead of PHY_INTERFACE_MODE_INTERNAL
      for the internal PHY, so this check breaks the PHY initialization:
      
      mt7530 mdio-bus:00 wan (uninitialized): failed to connect to PHY: -EINVAL
      
      Remove the check to make it work again.
      
      Reported-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Fixes: e40d2cca
      
       ("net: phy: add MediaTek Gigabit Ethernet PHY driver")
      Signed-off-by: default avatarDENG Qingfang <dqfext@gmail.com>
      Acked-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
      Tested-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      525b108e
    • Jon Maloy's avatar
      tipc: fix wrong publisher node address in link publications · 032062f3
      Jon Maloy authored
      When a link comes up we add its presence to the name table to make it
      possible for users to subscribe for link up/down events. However, after
      a previous call signature change the binding is wrongly published with
      the peer node as publishing node, instead of the own node as it should
      be. This has the effect that the command 'tipc name table show' will
      list the link binding (service type 2) with node scope and a peer node
      as originator, something that obviously is impossible.
      
      We correct this bug here.
      
      Fixes: 50a3499a
      
       ("tipc: simplify signature of tipc_namtbl_publish()")
      Signed-off-by: default avatarJon Maloy <jmaloy@redhat.com>
      Link: https://lore.kernel.org/r/20220214013852.2803940-1-jmaloy@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      032062f3
  2. Feb 14, 2022
    • Oliver Neukum's avatar
      USB: zaurus: support another broken Zaurus · 6605cc67
      Oliver Neukum authored
      
      
      This SL-6000 says Direct Line, not Ethernet
      
      v2: added Reporter and Link
      
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Reported-by: default avatarRoss Maynard <bids.7405@bigpond.com>
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=215361
      
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6605cc67
    • Nikolay Aleksandrov's avatar
      MAINTAINERS: bridge: update my email · 603c692d
      Nikolay Aleksandrov authored
      
      
      I'm leaving NVIDIA and my email account will stop working in a week, update
      it with my personal account.
      
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      603c692d
    • Alex Maydanik's avatar
      net: fix documentation for kernel_getsockname · 0fc95dec
      Alex Maydanik authored
      
      
      Fixes return value documentation of kernel_getsockname()
      and kernel_getpeername() functions.
      
      The previous documentation wrongly specified that the return
      value is 0 in case of success, however sock->ops->getname returns
      the length of the address in bytes in case of success.
      
      Signed-off-by: default avatarAlex Maydanik <alexander.maydanik@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fc95dec
    • Eric Dumazet's avatar
      net_sched: add __rcu annotation to netdev->qdisc · 5891cd5e
      Eric Dumazet authored
      syzbot found a data-race [1] which lead me to add __rcu
      annotations to netdev->qdisc, and proper accessors
      to get LOCKDEP support.
      
      [1]
      BUG: KCSAN: data-race in dev_activate / qdisc_lookup_rcu
      
      write to 0xffff888168ad6410 of 8 bytes by task 13559 on cpu 1:
       attach_default_qdiscs net/sched/sch_generic.c:1167 [inline]
       dev_activate+0x2ed/0x8f0 net/sched/sch_generic.c:1221
       __dev_open+0x2e9/0x3a0 net/core/dev.c:1416
       __dev_change_flags+0x167/0x3f0 net/core/dev.c:8139
       rtnl_configure_link+0xc2/0x150 net/core/rtnetlink.c:3150
       __rtnl_newlink net/core/rtnetlink.c:3489 [inline]
       rtnl_newlink+0xf4d/0x13e0 net/core/rtnetlink.c:3529
       rtnetlink_rcv_msg+0x745/0x7e0 net/core/rtnetlink.c:5594
       netlink_rcv_skb+0x14e/0x250 net/netlink/af_netlink.c:2494
       rtnetlink_rcv+0x18/0x20 net/core/rtnetlink.c:5612
       netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
       netlink_unicast+0x602/0x6d0 net/netlink/af_netlink.c:1343
       netlink_sendmsg+0x728/0x850 net/netlink/af_netlink.c:1919
       sock_sendmsg_nosec net/socket.c:705 [inline]
       sock_sendmsg net/socket.c:725 [inline]
       ____sys_sendmsg+0x39a/0x510 net/socket.c:2413
       ___sys_sendmsg net/socket.c:2467 [inline]
       __sys_sendmsg+0x195/0x230 net/socket.c:2496
       __do_sys_sendmsg net/socket.c:2505 [inline]
       __se_sys_sendmsg net/socket.c:2503 [inline]
       __x64_sys_sendmsg+0x42/0x50 net/socket.c:2503
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      read to 0xffff888168ad6410 of 8 bytes by task 13560 on cpu 0:
       qdisc_lookup_rcu+0x30/0x2e0 net/sched/sch_api.c:323
       __tcf_qdisc_find+0x74/0x3a0 net/sched/cls_api.c:1050
       tc_del_tfilter+0x1c7/0x1350 net/sched/cls_api.c:2211
       rtnetlink_rcv_msg+0x5ba/0x7e0 net/core/rtnetlink.c:5585
       netlink_rcv_skb+0x14e/0x250 net/netlink/af_netlink.c:2494
       rtnetlink_rcv+0x18/0x20 net/core/rtnetlink.c:5612
       netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
       netlink_unicast+0x602/0x6d0 net/netlink/af_netlink.c:1343
       netlink_sendmsg+0x728/0x850 net/netlink/af_netlink.c:1919
       sock_sendmsg_nosec net/socket.c:705 [inline]
       sock_sendmsg net/socket.c:725 [inline]
       ____sys_sendmsg+0x39a/0x510 net/socket.c:2413
       ___sys_sendmsg net/socket.c:2467 [inline]
       __sys_sendmsg+0x195/0x230 net/socket.c:2496
       __do_sys_sendmsg net/socket.c:2505 [inline]
       __se_sys_sendmsg net/socket.c:2503 [inline]
       __x64_sys_sendmsg+0x42/0x50 net/socket.c:2503
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      value changed: 0xffffffff85dee080 -> 0xffff88815d96ec00
      
      Reported by Kernel Concurrency Sanitizer on:
      CPU: 0 PID: 13560 Comm: syz-executor.2 Not tainted 5.17.0-rc3-syzkaller-00116-gf1baf68e1383-dirty #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      
      Fixes: 470502de
      
       ("net: sched: unlock rules update API")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Vlad Buslov <vladbu@mellanox.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Cong Wang <xiyou.wangcong@gmail.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5891cd5e
    • Vladimir Oltean's avatar
      net: dsa: mv88e6xxx: flush switchdev FDB workqueue before removing VLAN · a2614140
      Vladimir Oltean authored
      mv88e6xxx is special among DSA drivers in that it requires the VTU to
      contain the VID of the FDB entry it modifies in
      mv88e6xxx_port_db_load_purge(), otherwise it will return -EOPNOTSUPP.
      
      Sometimes due to races this is not always satisfied even if external
      code does everything right (first deletes the FDB entries, then the
      VLAN), because DSA commits to hardware FDB entries asynchronously since
      commit c9eb3e0f ("net: dsa: Add support for learning FDB through
      notification").
      
      Therefore, the mv88e6xxx driver must close this race condition by
      itself, by asking DSA to flush the switchdev workqueue of any FDB
      deletions in progress, prior to exiting a VLAN.
      
      Fixes: c9eb3e0f
      
       ("net: dsa: Add support for learning FDB through notification")
      Reported-by: default avatarRafael Richter <rafael.richter@gin.de>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2614140
    • Ignat Korchagin's avatar
      ipv6: mcast: use rcu-safe version of ipv6_get_lladdr() · 26394fc1
      Ignat Korchagin authored
      Some time ago 8965779d ("ipv6,mcast: always hold idev->lock before mca_lock")
      switched ipv6_get_lladdr() to __ipv6_get_lladdr(), which is rcu-unsafe
      version. That was OK, because idev->lock was held for these codepaths.
      
      In 88e2ca30 ("mld: convert ifmcaddr6 to RCU") these external locks were
      removed, so we probably need to restore the original rcu-safe call.
      
      Otherwise, we occasionally get a machine crashed/stalled with the following
      in dmesg:
      
      [ 3405.966610][T230589] general protection fault, probably for non-canonical address 0xdead00000000008c: 0000 [#1] SMP NOPTI
      [ 3405.982083][T230589] CPU: 44 PID: 230589 Comm: kworker/44:3 Tainted: G           O      5.15.19-cloudflare-2022.2.1 #1
      [ 3405.998061][T230589] Hardware name: SUPA-COOL-SERV
      [ 3406.009552][T230589] Workqueue: mld mld_ifc_work
      [ 3406.017224][T230589] RIP: 0010:__ipv6_get_lladdr+0x34/0x60
      [ 3406.025780][T230589] Code: 57 10 48 83 c7 08 48 89 e5 48 39 d7 74 3e 48 8d 82 38 ff ff ff eb 13 48 8b 90 d0 00 00 00 48 8d 82 38 ff ff ff 48 39 d7 74 22 <66> 83 78 32 20 77 1b 75 e4 89 ca 23 50 2c 75 dd 48 8b 50 08 48 8b
      [ 3406.055748][T230589] RSP: 0018:ffff94e4b3fc3d10 EFLAGS: 00010202
      [ 3406.065617][T230589] RAX: dead00000000005a RBX: ffff94e4b3fc3d30 RCX: 0000000000000040
      [ 3406.077477][T230589] RDX: dead000000000122 RSI: ffff94e4b3fc3d30 RDI: ffff8c3a31431008
      [ 3406.089389][T230589] RBP: ffff94e4b3fc3d10 R08: 0000000000000000 R09: 0000000000000000
      [ 3406.101445][T230589] R10: ffff8c3a31430000 R11: 000000000000000b R12: ffff8c2c37887100
      [ 3406.113553][T230589] R13: ffff8c3a39537000 R14: 00000000000005dc R15: ffff8c3a31431000
      [ 3406.125730][T230589] FS:  0000000000000000(0000) GS:ffff8c3b9fc80000(0000) knlGS:0000000000000000
      [ 3406.138992][T230589] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 3406.149895][T230589] CR2: 00007f0dfea1db60 CR3: 000000387b5f2000 CR4: 0000000000350ee0
      [ 3406.162421][T230589] Call Trace:
      [ 3406.170235][T230589]  <TASK>
      [ 3406.177736][T230589]  mld_newpack+0xfe/0x1a0
      [ 3406.186686][T230589]  add_grhead+0x87/0xa0
      [ 3406.195498][T230589]  add_grec+0x485/0x4e0
      [ 3406.204310][T230589]  ? newidle_balance+0x126/0x3f0
      [ 3406.214024][T230589]  mld_ifc_work+0x15d/0x450
      [ 3406.223279][T230589]  process_one_work+0x1e6/0x380
      [ 3406.232982][T230589]  worker_thread+0x50/0x3a0
      [ 3406.242371][T230589]  ? rescuer_thread+0x360/0x360
      [ 3406.252175][T230589]  kthread+0x127/0x150
      [ 3406.261197][T230589]  ? set_kthread_struct+0x40/0x40
      [ 3406.271287][T230589]  ret_from_fork+0x22/0x30
      [ 3406.280812][T230589]  </TASK>
      [ 3406.288937][T230589] Modules linked in: ... [last unloaded: kheaders]
      [ 3406.476714][T230589] ---[ end trace 3525a7655f2f3b9e ]---
      
      Fixes: 88e2ca30
      
       ("mld: convert ifmcaddr6 to RCU")
      Reported-by: default avatarDavid Pinilla Caparros <dpini@cloudflare.com>
      Signed-off-by: default avatarIgnat Korchagin <ignat@cloudflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26394fc1
    • Jesse Brandeburg's avatar
      ice: enable parsing IPSEC SPI headers for RSS · 86006f99
      Jesse Brandeburg authored
      The COMMS package can enable the hardware parser to recognize IPSEC
      frames with ESP header and SPI identifier.  If this package is available
      and configured for loading in /lib/firmware, then the driver will
      succeed in enabling this protocol type for RSS.
      
      This in turn allows the hardware to hash over the SPI and use it to pick
      a consistent receive queue for the same secure flow. Without this all
      traffic is steered to the same queue for multiple traffic threads from
      the same IP address. For that reason this is marked as a fix, as the
      driver supports the model, but it wasn't enabled.
      
      If the package is not available, adding this type will fail, but the
      failure is ignored on purpose as it has no negative affect.
      
      Fixes: c90ed40c
      
       ("ice: Enable writing hardware filtering tables")
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86006f99
  3. Feb 13, 2022
  4. Feb 12, 2022
  5. Feb 11, 2022
  6. Feb 10, 2022