Re: Re: [PATCH net v2] connector: Change the judgment conditions for clearing proc_event_num_listeners

From: Florian Westphal
Date: Fri Jan 19 2024 - 07:37:30 EST


wangkeqi <wangkeqi_chris@xxxxxxx> wrote:
>
> If cn_netlink_has_listeners() is used instead of proc_event_num_listeners, I think proc_event_num_listeners will be completely meaningless. 
> I read the code and found that there is nothing wrong with cn_netlink_has_listeners as a judgment of whether to send msg. 
> sock_close will update the listeners. The previous proc_event_num_listeners count was wrong, making it meaningless. 
> But if I change it to cn_netlink_has_listeners, will it affect some low-probability scenarios?

Please avoid top-posting on netdev mailing list.

Yes, thats what I meant, replace proc_event_num_listeners.

I do not know what a 'low-probability scenarios' is.