mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
netlink: Add new netlink_release function
A new function netlink_release is added in netlink_sock to store the protocol's release function. This is called when the socket is deleted. This can be supplied by the protocol via the release function in netlink_kernel_cfg. This is being added for the NETLINK_CONNECTOR protocol, so it can free it's data when socket is deleted. Signed-off-by: Anjali Kulkarni <anjali.k.kulkarni@oracle.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a3377386b5
commit
a4c9a56e6a
@@ -50,6 +50,7 @@ struct netlink_kernel_cfg {
|
||||
struct mutex *cb_mutex;
|
||||
int (*bind)(struct net *net, int group);
|
||||
void (*unbind)(struct net *net, int group);
|
||||
void (*release) (struct sock *sk, unsigned long *groups);
|
||||
};
|
||||
|
||||
struct sock *__netlink_kernel_create(struct net *net, int unit,
|
||||
|
||||
Reference in New Issue
Block a user