All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Juhee Kang <claudiajkang@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	ennoerlangen@gmail.com, george.mccollister@gmail.com,
	olteanv@gmail.com, marco.wenzel@a-eberle.de,
	xiong.zhenwu@zte.com.cn
Subject: Re: [PATCH v4 net-next] net: hsr: use hlist_head instead of list_head for mac addresses
Date: Mon, 7 Feb 2022 21:23:15 -0800	[thread overview]
Message-ID: <3e5d1f9d-838d-bb82-44e7-7ea85b1ec91c@gmail.com> (raw)
In-Reply-To: <164414580941.29882.3204574468884683223.git-patchwork-notify@kernel.org>


On 2/6/22 03:10, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
>
> This patch was applied to netdev/net-next.git (master)
> by David S. Miller <davem@davemloft.net>:
>
> On Sat,  5 Feb 2022 15:40:38 +0000 you wrote:
>> Currently, HSR manages mac addresses of known HSR nodes by using list_head.
>> It takes a lot of time when there are a lot of registered nodes due to
>> finding specific mac address nodes by using linear search. We can be
>> reducing the time by using hlist. Thus, this patch moves list_head to
>> hlist_head for mac addresses and this allows for further improvement of
>> network performance.
>>
>> [...]
> Here is the summary with links:
>    - [v4,net-next] net: hsr: use hlist_head instead of list_head for mac addresses
>      https://git.kernel.org/netdev/net-next/c/4acc45db7115
>
> You are awesome, thank you!


I think this patch has not been tested with CONFIG_PROVE_RCU=y


WARNING: suspicious RCU usage
5.17.0-rc3-next-20220207-syzkaller #0 Not tainted
-----------------------------
net/hsr/hsr_framereg.c:34 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
2 locks held by syz-executor.0/3603:
  #0: ffffffff8d3353a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock 
net/core/rtnetlink.c:72 [inline]
  #0: ffffffff8d3353a8 (rtnl_mutex){+.+.}-{3:3}, at: 
rtnetlink_rcv_msg+0x3be/0xb80 net/core/rtnetlink.c:5591
  #1: ffff88806e13d5f0 (&hsr->list_lock){+...}-{2:2}, at: spin_lock_bh 
include/linux/spinlock.h:359 [inline]
  #1: ffff88806e13d5f0 (&hsr->list_lock){+...}-{2:2}, at: 
hsr_create_self_node+0x225/0x650 net/hsr/hsr_framereg.c:108

stack backtrace:
CPU: 0 PID: 3603 Comm: syz-executor.0 Not tainted 
5.17.0-rc3-next-20220207-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS 
Google 01/01/2011
Call Trace:
  <TASK>
  __dump_stack lib/dump_stack.c:88 [inline]
  dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
  hsr_node_get_first+0x9b/0xb0 net/hsr/hsr_framereg.c:34
  hsr_create_self_node+0x22d/0x650 net/hsr/hsr_framereg.c:109
  hsr_dev_finalize+0x2c1/0x7d0 net/hsr/hsr_device.c:514
  hsr_newlink+0x315/0x730 net/hsr/hsr_netlink.c:102
  __rtnl_newlink+0x107c/0x1760 net/core/rtnetlink.c:3481
  rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3529
  rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5594
  netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494
  netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
  netlink_unicast+0x539/0x7e0 net/netlink/af_netlink.c:1343
  netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1919
  sock_sendmsg_nosec net/socket.c:705 [inline]
  sock_sendmsg+0xcf/0x120 net/socket.c:725
  __sys_sendto+0x21c/0x320 net/socket.c:2040
  __do_sys_sendto net/socket.c:2052 [inline]
  __se_sys_sendto net/socket.c:2048 [inline]
  __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2048
  do_syscall_x64 arch/x86/entry/common.c:50 [inline]
  do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
  entry_SYSCALL_64_after_hwframe+0x44/0xae



  reply	other threads:[~2022-02-08  5:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 15:40 [PATCH v4 net-next] net: hsr: use hlist_head instead of list_head for mac addresses Juhee Kang
2022-02-06 11:10 ` patchwork-bot+netdevbpf
2022-02-08  5:23   ` Eric Dumazet [this message]
2022-02-08  5:42     ` Juhee Kang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e5d1f9d-838d-bb82-44e7-7ea85b1ec91c@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=claudiajkang@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ennoerlangen@gmail.com \
    --cc=george.mccollister@gmail.com \
    --cc=kuba@kernel.org \
    --cc=marco.wenzel@a-eberle.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=xiong.zhenwu@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.