* [PATCH] connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared"
@ 2024-02-09 9:16 Keqi Wang
2024-02-13 10:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Keqi Wang @ 2024-02-09 9:16 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni
Cc: netdev, linux-kernel, Keqi Wang, kernel test robot
This reverts commit c46bfba1337d ("connector: Fix proc_event_num_listeners
count not cleared").
It is not accurate to reset proc_event_num_listeners according to
cn_netlink_send_mult() return value -ESRCH.
In the case of stress-ng netlink-proc, -ESRCH will always be returned,
because netlink_broadcast_filtered will return -ESRCH,
which may cause stress-ng netlink-proc performance degradation.
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202401112259.b23a1567-oliver.sang@intel.com
Fixes: c46bfba1337d ("connector: Fix proc_event_num_listeners count not cleared")
Signed-off-by: Keqi Wang <wangkeqi_chris@163.com>
---
drivers/connector/cn_proc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c
index 3d5e6d705fc6..44b19e696176 100644
--- a/drivers/connector/cn_proc.c
+++ b/drivers/connector/cn_proc.c
@@ -108,9 +108,8 @@ static inline void send_msg(struct cn_msg *msg)
filter_data[1] = 0;
}
- if (cn_netlink_send_mult(msg, msg->len, 0, CN_IDX_PROC, GFP_NOWAIT,
- cn_filter, (void *)filter_data) == -ESRCH)
- atomic_set(&proc_event_num_listeners, 0);
+ cn_netlink_send_mult(msg, msg->len, 0, CN_IDX_PROC, GFP_NOWAIT,
+ cn_filter, (void *)filter_data);
local_unlock(&local_event.lock);
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared"
2024-02-09 9:16 [PATCH] connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared" Keqi Wang
@ 2024-02-13 10:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-13 10:30 UTC (permalink / raw)
To: Keqi Wang
Cc: davem, edumazet, kuba, pabeni, netdev, linux-kernel, oliver.sang
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Fri, 9 Feb 2024 17:16:59 +0800 you wrote:
> This reverts commit c46bfba1337d ("connector: Fix proc_event_num_listeners
> count not cleared").
>
> It is not accurate to reset proc_event_num_listeners according to
> cn_netlink_send_mult() return value -ESRCH.
>
> In the case of stress-ng netlink-proc, -ESRCH will always be returned,
> because netlink_broadcast_filtered will return -ESRCH,
> which may cause stress-ng netlink-proc performance degradation.
>
> [...]
Here is the summary with links:
- connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared"
https://git.kernel.org/netdev/net/c/8929f95b2b58
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-13 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-09 9:16 [PATCH] connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared" Keqi Wang
2024-02-13 10:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).