Skip to content
  1. Dec 09, 2020
    • Zhang Changzhong's avatar
      net: ll_temac: Fix potential NULL dereference in temac_probe() · cc6596fc
      Zhang Changzhong authored
      platform_get_resource() may fail and in this case a NULL dereference
      will occur.
      
      Fix it to use devm_platform_ioremap_resource() instead of calling
      platform_get_resource() and devm_ioremap().
      
      This is detected by Coccinelle semantic patch.
      
      @@
      expression pdev, res, n, t, e, e1, e2;
      @@
      
      res = \(platform_get_resource\|platform_get_resource_byname\)(pdev, t, n);
      + if (!res)
      +   return -EINVAL;
      ... when != res == NULL
      e = devm_ioremap(e1, res->start, e2);
      
      Fixes: 8425c41d
      
       ("net: ll_temac: Extend support to non-device-tree platforms")
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Acked-by: default avatarEsben Haabendal <esben@geanix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc6596fc
    • Cengiz Can's avatar
      net: tipc: prevent possible null deref of link · 0398ba9e
      Cengiz Can authored
      
      
      `tipc_node_apply_property` does a null check on a `tipc_link_entry`
      pointer but also accesses the same pointer out of the null check block.
      
      This triggers a warning on Coverity Static Analyzer because we're
      implying that `e->link` can BE null.
      
      Move "Update MTU for node link entry" line into if block to make sure
      that we're not in a state that `e->link` is null.
      
      Signed-off-by: default avatarCengiz Can <cengiz@kernel.wtf>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0398ba9e
    • David S. Miller's avatar
      Merge branch 'stmmac-fixes' · 9756bb63
      David S. Miller authored
      
      
      Joakim Zhang says:
      
      ====================
      patches for stmmac
      
      A patch set for stmmac, fix some driver issues.
      
      ChangeLogs:
      V1->V2:
      	* add Fixes tag.
      	* add patch 5/5 into this patch set.
      
      V2->V3:
      	* rebase to latest net tree where fixes go.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9756bb63
    • Fugang Duan's avatar
      net: stmmac: overwrite the dma_cap.addr64 according to HW design · f119cc98
      Fugang Duan authored
      The current IP register MAC_HW_Feature1[ADDR64] only defines
      32/40/64 bit width, but some SOCs support others like i.MX8MP
      support 34 bits but it maps to 40 bits width in MAC_HW_Feature1[ADDR64].
      So overwrite dma_cap.addr64 according to HW real design.
      
      Fixes: 94abdad6
      
       ("net: ethernet: dwmac: add ethernet glue logic for NXP imx8 chip")
      Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f119cc98
    • Fugang Duan's avatar
      net: stmmac: delete the eee_ctrl_timer after napi disabled · 5f585913
      Fugang Duan authored
      There have chance to re-enable the eee_ctrl_timer and fire the timer
      in napi callback after delete the timer in .stmmac_release(), which
      introduces to access eee registers in the timer function after clocks
      are disabled then causes system hang. Found this issue when do
      suspend/resume and reboot stress test.
      
      It is safe to delete the timer after napi disabled and disable lpi mode.
      
      Fixes: d765955d
      
       ("stmmac: add the Energy Efficient Ethernet support")
      Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f585913
    • Fugang Duan's avatar
      net: stmmac: free tx skb buffer in stmmac_resume() · 4ec236c7
      Fugang Duan authored
      When do suspend/resume test, there have WARN_ON() log dump from
      stmmac_xmit() funciton, the code logic:
      	entry = tx_q->cur_tx;
      	first_entry = entry;
      	WARN_ON(tx_q->tx_skbuff[first_entry]);
      
      In normal case, tx_q->tx_skbuff[txq->cur_tx] should be NULL because
      the skb should be handled and freed in stmmac_tx_clean().
      
      But stmmac_resume() reset queue parameters like below, skb buffers
      may not be freed.
      	tx_q->cur_tx = 0;
      	tx_q->dirty_tx = 0;
      
      So free tx skb buffer in stmmac_resume() to avoid warning and
      memory leak.
      
      log:
      [   46.139824] ------------[ cut here ]------------
      [   46.144453] WARNING: CPU: 0 PID: 0 at drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3235 stmmac_xmit+0x7a0/0x9d0
      [   46.154969] Modules linked in: crct10dif_ce vvcam(O) flexcan can_dev
      [   46.161328] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O      5.4.24-2.1.0+g2ad925d15481 #1
      [   46.170369] Hardware name: NXP i.MX8MPlus EVK board (DT)
      [   46.175677] pstate: 80000005 (Nzcv daif -PAN -UAO)
      [   46.180465] pc : stmmac_xmit+0x7a0/0x9d0
      [   46.184387] lr : dev_hard_start_xmit+0x94/0x158
      [   46.188913] sp : ffff800010003cc0
      [   46.192224] x29: ffff800010003cc0 x28: ffff000177e2a100
      [   46.197533] x27: ffff000176ef0840 x26: ffff000176ef0090
      [   46.202842] x25: 0000000000000000 x24: 0000000000000000
      [   46.208151] x23: 0000000000000003 x22: ffff8000119ddd30
      [   46.213460] x21: ffff00017636f000 x20: ffff000176ef0cc0
      [   46.218769] x19: 0000000000000003 x18: 0000000000000000
      [   46.224078] x17: 0000000000000000 x16: 0000000000000000
      [   46.229386] x15: 0000000000000079 x14: 0000000000000000
      [   46.234695] x13: 0000000000000003 x12: 0000000000000003
      [   46.240003] x11: 0000000000000010 x10: 0000000000000010
      [   46.245312] x9 : ffff00017002b140 x8 : 0000000000000000
      [   46.250621] x7 : ffff00017636f000 x6 : 0000000000000010
      [   46.255930] x5 : 0000000000000001 x4 : ffff000176ef0000
      [   46.261238] x3 : 0000000000000003 x2 : 00000000ffffffff
      [   46.266547] x1 : ffff000177e2a000 x0 : 0000000000000000
      [   46.271856] Call trace:
      [   46.274302]  stmmac_xmit+0x7a0/0x9d0
      [   46.277874]  dev_hard_start_xmit+0x94/0x158
      [   46.282056]  sch_direct_xmit+0x11c/0x338
      [   46.285976]  __qdisc_run+0x118/0x5f0
      [   46.289549]  net_tx_action+0x110/0x198
      [   46.293297]  __do_softirq+0x120/0x23c
      [   46.296958]  irq_exit+0xb8/0xd8
      [   46.300098]  __handle_domain_irq+0x64/0xb8
      [   46.304191]  gic_handle_irq+0x5c/0x148
      [   46.307936]  el1_irq+0xb8/0x180
      [   46.311076]  cpuidle_enter_state+0x84/0x360
      [   46.315256]  cpuidle_enter+0x34/0x48
      [   46.318829]  call_cpuidle+0x18/0x38
      [   46.322314]  do_idle+0x1e0/0x280
      [   46.325539]  cpu_startup_entry+0x24/0x40
      [   46.329460]  rest_init+0xd4/0xe0
      [   46.332687]  arch_call_rest_init+0xc/0x14
      [   46.336695]  start_kernel+0x420/0x44c
      [   46.340353] ---[ end trace bc1ee695123cbacd ]---
      
      Fixes: 47dd7a54
      
       ("net: add support for STMicroelectronics Ethernet controllers.")
      Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ec236c7
    • Fugang Duan's avatar
      net: stmmac: start phylink instance before stmmac_hw_setup() · 36d18b56
      Fugang Duan authored
      Start phylink instance and resume back the PHY to supply
      RX clock to MAC before MAC layer initialization by calling
      .stmmac_hw_setup(), since DMA reset depends on the RX clock,
      otherwise DMA reset cost maximum timeout value then finally
      timeout.
      
      Fixes: 74371272
      
       ("net: stmmac: Convert to phylink and remove phylib logic")
      Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36d18b56
    • Fugang Duan's avatar
      net: stmmac: increase the timeout for dma reset · 9d14edfd
      Fugang Duan authored
      
      
      Current timeout value is not enough for gmac5 dma reset
      on imx8mp platform, increase the timeout range.
      
      Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d14edfd
    • Jarod Wilson's avatar
      bonding: fix feature flag setting at init time · 007ab534
      Jarod Wilson authored
      Don't try to adjust XFRM support flags if the bond device isn't yet
      registered. Bad things can currently happen when netdev_change_features()
      is called without having wanted_features fully filled in yet. This code
      runs both on post-module-load mode changes, as well as at module init
      time, and when run at module init time, it is before register_netdevice()
      has been called and filled in wanted_features. The empty wanted_features
      led to features also getting emptied out, which was definitely not the
      intended behavior, so prevent that from happening.
      
      Originally, I'd hoped to stop adjusting wanted_features at all in the
      bonding driver, as it's documented as being something only the network
      core should touch, but we actually do need to do this to properly update
      both the features and wanted_features fields when changing the bond type,
      or we get to a situation where ethtool sees:
      
          esp-hw-offload: off [requested on]
      
      I do think we should be using netdev_update_features instead of
      netdev_change_features here though, so we only send notifiers when the
      features actually changed.
      
      Fixes: a3b658cf
      
       ("bonding: allow xfrm offload setup post-module-load")
      Reported-by: default avatarIvan Vecera <ivecera@redhat.com>
      Suggested-by: default avatarIvan Vecera <ivecera@redhat.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Link: https://lore.kernel.org/r/20201205172229.576587-1-jarod@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      007ab534
  2. Dec 08, 2020
  3. Dec 07, 2020
  4. Dec 06, 2020
  5. Dec 05, 2020
    • Eric Dumazet's avatar
      mac80211: mesh: fix mesh_pathtbl_init() error path · 905b2032
      Eric Dumazet authored
      If tbl_mpp can not be allocated, we call mesh_table_free(tbl_path)
      while tbl_path rhashtable has not yet been initialized, which causes
      panics.
      
      Simply factorize the rhashtable_init() call into mesh_table_alloc()
      
      WARNING: CPU: 1 PID: 8474 at kernel/workqueue.c:3040 __flush_work kernel/workqueue.c:3040 [inline]
      WARNING: CPU: 1 PID: 8474 at kernel/workqueue.c:3040 __cancel_work_timer+0x514/0x540 kernel/workqueue.c:3136
      Modules linked in:
      CPU: 1 PID: 8474 Comm: syz-executor663 Not tainted 5.10.0-rc6-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:__flush_work kernel/workqueue.c:3040 [inline]
      RIP: 0010:__cancel_work_timer+0x514/0x540 kernel/workqueue.c:3136
      Code: 5d c3 e8 bf ae 29 00 0f 0b e9 f0 fd ff ff e8 b3 ae 29 00 0f 0b 43 80 3c 3e 00 0f 85 31 ff ff ff e9 34 ff ff ff e8 9c ae 29 00 <0f> 0b e9 dc fe ff ff 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 7d fd ff
      RSP: 0018:ffffc9000165f5a0 EFLAGS: 00010293
      RAX: ffffffff814b7064 RBX: 0000000000000001 RCX: ffff888021c80000
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
      RBP: ffff888024039ca0 R08: dffffc0000000000 R09: fffffbfff1dd3e64
      R10: fffffbfff1dd3e64 R11: 0000000000000000 R12: 1ffff920002cbebd
      R13: ffff888024039c88 R14: 1ffff11004807391 R15: dffffc0000000000
      FS:  0000000001347880(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000020000140 CR3: 000000002cc0a000 CR4: 00000000001506e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       rhashtable_free_and_destroy+0x25/0x9c0 lib/rhashtable.c:1137
       mesh_table_free net/mac80211/mesh_pathtbl.c:69 [inline]
       mesh_pathtbl_init+0x287/0x2e0 net/mac80211/mesh_pathtbl.c:785
       ieee80211_mesh_init_sdata+0x2ee/0x530 net/mac80211/mesh.c:1591
       ieee80211_setup_sdata+0x733/0xc40 net/mac80211/iface.c:1569
       ieee80211_if_add+0xd5c/0x1cd0 net/mac80211/iface.c:1987
       ieee80211_add_iface+0x59/0x130 net/mac80211/cfg.c:125
       rdev_add_virtual_intf net/wireless/rdev-ops.h:45 [inline]
       nl80211_new_interface+0x563/0xb40 net/wireless/nl80211.c:3855
       genl_family_rcv_msg_doit net/netlink/genetlink.c:739 [inline]
       genl_family_rcv_msg net/netlink/genetlink.c:783 [inline]
       genl_rcv_msg+0xe4e/0x1280 net/netlink/genetlink.c:800
       netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2494
       genl_rcv+0x24/0x40 net/netlink/genetlink.c:811
       netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
       netlink_unicast+0x780/0x930 net/netlink/af_netlink.c:1330
       netlink_sendmsg+0x9a8/0xd40 net/netlink/af_netlink.c:1919
       sock_sendmsg_nosec net/socket.c:651 [inline]
       sock_sendmsg net/socket.c:671 [inline]
       ____sys_sendmsg+0x519/0x800 net/socket.c:2353
       ___sys_sendmsg net/socket.c:2407 [inline]
       __sys_sendmsg+0x2b1/0x360 net/socket.c:2440
       do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 60854fd9
      
       ("mac80211: mesh: convert path table to rhashtable")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Link: https://lore.kernel.org/r/20201204162428.2583119-1-eric.dumazet@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      905b2032
    • Wang Hai's avatar
      openvswitch: fix error return code in validate_and_copy_dec_ttl() · bb2da765
      Wang Hai authored
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Changing 'return start' to 'return action_start' can fix this bug.
      
      Fixes: 69929d4c
      
       ("net: openvswitch: fix TTL decrement action netlink message format")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
      Reviewed-by: default avatarEelco Chaudron <echaudro@redhat.com>
      Link: https://lore.kernel.org/r/20201204114314.1596-1-wanghai38@huawei.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bb2da765
    • Zhang Changzhong's avatar
      net: bridge: vlan: fix error return code in __vlan_add() · ee4f52a8
      Zhang Changzhong authored
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: f8ed289f
      
       ("bridge: vlan: use br_vlan_(get|put)_master to deal with refcounts")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Link: https://lore.kernel.org/r/1607071737-33875-1-git-send-email-zhangchangzhong@huawei.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ee4f52a8
    • Zhang Changzhong's avatar
      ipv4: fix error return code in rtm_to_fib_config() · b410f04e
      Zhang Changzhong authored
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: d1566268
      
       ("ipv4: Allow ipv6 gateway with ipv4 routes")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/1607071695-33740-1-git-send-email-zhangchangzhong@huawei.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b410f04e
    • Arnd Bergmann's avatar
      ethernet: select CONFIG_CRC32 as needed · 0b32e91f
      Arnd Bergmann authored
      
      
      A number of ethernet drivers require crc32 functionality to be
      avaialable in the kernel, causing a link error otherwise:
      
      arm-linux-gnueabi-ld: drivers/net/ethernet/agere/et131x.o: in function `et1310_setup_device_for_multicast':
      et131x.c:(.text+0x5918): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/cadence/macb_main.o: in function `macb_start_xmit':
      macb_main.c:(.text+0x4b88): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/faraday/ftgmac100.o: in function `ftgmac100_set_rx_mode':
      ftgmac100.c:(.text+0x2b38): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fec_main.o: in function `set_multicast_list':
      fec_main.c:(.text+0x6120): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fman/fman_dtsec.o: in function `dtsec_add_hash_mac_address':
      fman_dtsec.c:(.text+0x830): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fman/fman_dtsec.o:fman_dtsec.c:(.text+0xb68): more undefined references to `crc32_le' follow
      arm-linux-gnueabi-ld: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_hwinfo.o: in function `nfp_hwinfo_read':
      nfp_hwinfo.c:(.text+0x250): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: nfp_hwinfo.c:(.text+0x288): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_resource.o: in function `nfp_resource_acquire':
      nfp_resource.c:(.text+0x144): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: nfp_resource.c:(.text+0x158): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: drivers/net/ethernet/nxp/lpc_eth.o: in function `lpc_eth_set_multicast_list':
      lpc_eth.c:(.text+0x1934): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_flow_tbl_do':
      rocker_ofdpa.c:(.text+0x2e08): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_flow_tbl_del':
      rocker_ofdpa.c:(.text+0x3074): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_port_fdb':
      arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.o: in function `mlx5dr_ste_calc_hash_index':
      dr_ste.c:(.text+0x354): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/lan743x_main.o: in function `lan743x_netdev_set_multicast':
      lan743x_main.c:(.text+0x5dc4): undefined reference to `crc32_le'
      
      Add the missing 'select CRC32' entries in Kconfig for each of them.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Acked-by: default avatarMadalin Bucur <madalin.bucur@oss.nxp.com>
      Acked-by: default avatarMark Einon <mark.einon@gmail.com>
      Acked-by: default avatarSimon Horman <simon.horman@netronome.com>
      Link: https://lore.kernel.org/r/20201203232114.1485603-1-arnd@kernel.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0b32e91f
    • Alex Elder's avatar
      net: ipa: pass the correct size when freeing DMA memory · 1130b252
      Alex Elder authored
      When the coherent memory is freed in gsi_trans_pool_exit_dma(), we
      are mistakenly passing the size of a single element in the pool
      rather than the actual allocated size.  Fix this bug.
      
      Fixes: 9dd441e4
      
       ("soc: qcom: ipa: GSI transactions")
      Reported-by: default avatarStephen Boyd <swboyd@chromium.org>
      Tested-by: default avatarSujit Kautkar <sujitka@chromium.org>
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Link: https://lore.kernel.org/r/20201203215106.17450-1-elder@linaro.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1130b252
    • Davide Caratti's avatar
      net/sched: fq_pie: initialize timer earlier in fq_pie_init() · 4eef8b1f
      Davide Caratti authored
      with the following tdc testcase:
      
       83be: (qdisc, fq_pie) Create FQ-PIE with invalid number of flows
      
      as fq_pie_init() fails, fq_pie_destroy() is called to clean up. Since the
      timer is not yet initialized, it's possible to observe a splat like this:
      
        INFO: trying to register non-static key.
        the code is fine but needs lockdep annotation.
        turning off the locking correctness validator.
        CPU: 0 PID: 975 Comm: tc Not tainted 5.10.0-rc4+ #298
        Hardware name: Red Hat KVM, BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/01/2014
        Call Trace:
         dump_stack+0x99/0xcb
         register_lock_class+0x12dd/0x1750
         __lock_acquire+0xfe/0x3970
         lock_acquire+0x1c8/0x7f0
         del_timer_sync+0x49/0xd0
         fq_pie_destroy+0x3f/0x80 [sch_fq_pie]
         qdisc_create+0x916/0x1160
         tc_modify_qdisc+0x3c4/0x1630
         rtnetlink_rcv_msg+0x346/0x8e0
         netlink_unicast+0x439/0x630
         netlink_sendmsg+0x719/0xbf0
         sock_sendmsg+0xe2/0x110
         ____sys_sendmsg+0x5ba/0x890
         ___sys_sendmsg+0xe9/0x160
         __sys_sendmsg+0xd3/0x170
         do_syscall_64+0x33/0x40
         entry_SYSCALL_64_after_hwframe+0x44/0xa9
        [...]
        ODEBUG: assert_init not available (active state 0) object type: timer_list hint: 0x0
        WARNING: CPU: 0 PID: 975 at lib/debugobjects.c:508 debug_print_object+0x162/0x210
        [...]
        Call Trace:
         debug_object_assert_init+0x268/0x380
         try_to_del_timer_sync+0x6a/0x100
         del_timer_sync+0x9e/0xd0
         fq_pie_destroy+0x3f/0x80 [sch_fq_pie]
         qdisc_create+0x916/0x1160
         tc_modify_qdisc+0x3c4/0x1630
         rtnetlink_rcv_msg+0x346/0x8e0
         netlink_rcv_skb+0x120/0x380
         netlink_unicast+0x439/0x630
         netlink_sendmsg+0x719/0xbf0
         sock_sendmsg+0xe2/0x110
         ____sys_sendmsg+0x5ba/0x890
         ___sys_sendmsg+0xe9/0x160
         __sys_sendmsg+0xd3/0x170
         do_syscall_64+0x33/0x40
         entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      fix it moving timer_setup() before any failure, like it was done on 'red'
      with former commit 608b4ada ("net_sched: initialize timer earlier in
      red_init()").
      
      Fixes: ec97ecf1
      
       ("net: sched: add Flow Queue PIE packet scheduler")
      Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
      Reviewed-by: default avatarCong Wang <cong.wang@bytedance.com>
      Link: https://lore.kernel.org/r/2e78e01c504c633ebdff18d041833cf2e079a3a4.1607020450.git.dcaratti@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4eef8b1f
    • Jakub Kicinski's avatar
      Merge tag 'mac80211-for-net-2020-12-04' of... · a1cdfbe8
      Jakub Kicinski authored
      Merge tag 'mac80211-for-net-2020-12-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      
      Johannes Berg says:
      
      ====================
      Three small fixes:
       * initialize some data to avoid using stack garbage
       * fix 6 GHz channel selection in mac80211
       * correctly restart monitor mode interfaces in mac80211
      
      * tag 'mac80211-for-net-2020-12-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211:
        mac80211: set SDATA_STATE_RUNNING for monitor interfaces
        cfg80211: initialize rekey_data
        mac80211: fix return value of ieee80211_chandef_he_6ghz_oper
      ====================
      
      Link: https://lore.kernel.org/r/20201204122017.118099-1-johannes@sipsolutions.net
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a1cdfbe8
  6. Dec 04, 2020