netlink: Add new netlink_release function
authorAnjali Kulkarni <anjali.k.kulkarni@oracle.com>
Wed, 19 Jul 2023 20:18:17 +0000 (13:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Jul 2023 10:34:22 +0000 (11:34 +0100)
commita4c9a56e6a2cdeeab7caef1f496b7bfefd95b50e
tree6570a5cb17ff33f9b1f97649b8e86bb98cdd019b
parenta3377386b56420d78a4c0a931a40f9a25c3ca2bd
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>
include/linux/netlink.h
net/netlink/af_netlink.c
net/netlink/af_netlink.h