2024-04-24 13:55:00

by Adrián Moreno

[permalink] [raw]
Subject: [PATCH net-next 1/8] net: netlink: export genl private pointer getters

Both "__genl_sk_priv_get" and "genl_sk_priv_get" are useful functions to
handle private pointers attached to genetlink sockets.
Export them so they can be used in modules.

Reviewed-by: Jakub Kicinski <[email protected]>
Signed-off-by: Adrian Moreno <[email protected]>
---
net/netlink/genetlink.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index feb54c63a116..beafa415a9f5 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -726,6 +726,7 @@ void *__genl_sk_priv_get(struct genl_family *family, struct sock *sk)
return ERR_PTR(-EINVAL);
return xa_load(family->sock_privs, (unsigned long) sk);
}
+EXPORT_SYMBOL(__genl_sk_priv_get);

/**
* genl_sk_priv_get - Get family private pointer for socket
@@ -764,6 +765,7 @@ void *genl_sk_priv_get(struct genl_family *family, struct sock *sk)
}
return priv;
}
+EXPORT_SYMBOL(genl_sk_priv_get);

/**
* genl_register_family - register a generic netlink family
--
2.44.0