summaryrefslogtreecommitdiffstats
path: root/drivers/connector
diff options
context:
space:
mode:
authorKeqi Wang <wangkeqi_chris@163.com>2024-02-09 17:16:59 +0800
committerPaolo Abeni <pabeni@redhat.com>2024-02-13 11:15:44 +0100
commit8929f95b2b587791a7dcd04cc91520194a76d3a6 (patch)
tree4d2230e6aae2241945eb22e038caf098e8bd41fe /drivers/connector
parentf1acf1ac84d2ae97b7889b87223c1064df850069 (diff)
downloadlinux-stable-8929f95b2b587791a7dcd04cc91520194a76d3a6.tar.gz
linux-stable-8929f95b2b587791a7dcd04cc91520194a76d3a6.tar.bz2
linux-stable-8929f95b2b587791a7dcd04cc91520194a76d3a6.zip
connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared"
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> Link: https://lore.kernel.org/r/20240209091659.68723-1-wangkeqi_chris@163.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/connector')
-rw-r--r--drivers/connector/cn_proc.c5
1 files 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);
}