linux/drivers/w1
Anjali Kulkarni 2aa1f7a1f4 connector/cn_proc: Add filtering to fix some bugs
The current proc connector code has the foll. bugs - if there are more
than one listeners for the proc connector messages, and one of them
deregisters for listening using PROC_CN_MCAST_IGNORE, they will still get
all proc connector messages, as long as there is another listener.

Another issue is if one client calls PROC_CN_MCAST_LISTEN, and another one
calls PROC_CN_MCAST_IGNORE, then both will end up not getting any messages.

This patch adds filtering and drops packet if client has sent
PROC_CN_MCAST_IGNORE. This data is stored in the client socket's
sk_user_data. In addition, we only increment or decrement
proc_event_num_listeners once per client. This fixes the above issues.

cn_release is the release function added for NETLINK_CONNECTOR. It uses
the newly added netlink_release function added to netlink_sock. It will
free sk_user_data.

Signed-off-by: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-07-23 11:34:22 +01:00
..
masters w1: sgi: move from strlcpy with unused retval to strscpy 2023-05-08 08:14:49 +02:00
slaves w1: therm: constify pointers to hwmon_channel_info 2023-05-08 12:16:38 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
w1_family.c
w1_int.c w1: fix deadloop in __w1_remove_master_device() 2023-01-19 17:26:31 +01:00
w1_internal.h
w1_io.c
w1_netlink.c connector/cn_proc: Add filtering to fix some bugs 2023-07-23 11:34:22 +01:00
w1_netlink.h w1: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
w1.c w1: Replace usage of found with dedicated list iterator variable 2023-05-13 21:15:02 +02:00