1. 08 12月, 2020 1 次提交
  2. 07 12月, 2020 2 次提交
  3. 06 12月, 2020 5 次提交
  4. 05 12月, 2020 8 次提交
    • E
      mac80211: mesh: fix mesh_pathtbl_init() error path · 905b2032
      Eric Dumazet 提交于
      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: NEric Dumazet <edumazet@google.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Link: https://lore.kernel.org/r/20201204162428.2583119-1-eric.dumazet@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      905b2032
    • W
      openvswitch: fix error return code in validate_and_copy_dec_ttl() · bb2da765
      Wang Hai 提交于
      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: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWang Hai <wanghai38@huawei.com>
      Reviewed-by: NEelco Chaudron <echaudro@redhat.com>
      Link: https://lore.kernel.org/r/20201204114314.1596-1-wanghai38@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      bb2da765
    • Z
      net: bridge: vlan: fix error return code in __vlan_add() · ee4f52a8
      Zhang Changzhong 提交于
      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: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Link: https://lore.kernel.org/r/1607071737-33875-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      ee4f52a8
    • Z
      ipv4: fix error return code in rtm_to_fib_config() · b410f04e
      Zhang Changzhong 提交于
      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: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Reviewed-by: NDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/1607071695-33740-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      b410f04e
    • A
      ethernet: select CONFIG_CRC32 as needed · 0b32e91f
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NNicolas Ferre <nicolas.ferre@microchip.com>
      Acked-by: NMadalin Bucur <madalin.bucur@oss.nxp.com>
      Acked-by: NMark Einon <mark.einon@gmail.com>
      Acked-by: NSimon Horman <simon.horman@netronome.com>
      Link: https://lore.kernel.org/r/20201203232114.1485603-1-arnd@kernel.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      0b32e91f
    • A
      net: ipa: pass the correct size when freeing DMA memory · 1130b252
      Alex Elder 提交于
      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: NStephen Boyd <swboyd@chromium.org>
      Tested-by: NSujit Kautkar <sujitka@chromium.org>
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Link: https://lore.kernel.org/r/20201203215106.17450-1-elder@linaro.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      1130b252
    • D
      net/sched: fq_pie: initialize timer earlier in fq_pie_init() · 4eef8b1f
      Davide Caratti 提交于
      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: NDavide Caratti <dcaratti@redhat.com>
      Reviewed-by: NCong Wang <cong.wang@bytedance.com>
      Link: https://lore.kernel.org/r/2e78e01c504c633ebdff18d041833cf2e079a3a4.1607020450.git.dcaratti@redhat.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      4eef8b1f
    • J
      Merge tag 'mac80211-for-net-2020-12-04' of... · a1cdfbe8
      Jakub Kicinski 提交于
      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.netSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      a1cdfbe8
  5. 04 12月, 2020 21 次提交
  6. 03 12月, 2020 3 次提交