do_sock_setsockopt() and do_sock_getsockopt() have been exported since
they were split out of the syscall handlers for io_uring to reuse.
io_uring is the only caller outside net/socket.c, and it is never
modular: cmd_net.o is built under obj-$(CONFIG_NET), and both CONFIG_NET
and CONFIG_IO_URING are bool. The declarations in <net/sock.h> are all
it needs, so no module has ever been able to use these exports.
Drop the symbol exports.
Fixes: 1406245c2945 ("net/socket: Break down __sys_setsockopt")
Fixes: 0b05b0cd78c9 ("net/socket: Break down __sys_getsockopt")
Suggested-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/all/20260819090439.GB9267@lst.de/ (local)
Signed-off-by: Breno Leitao <leitao@debian.org>
---
Changes in v2:
- s/export/exports/ in the commit message (hch)
- Link to v1: https://patch.msgid.link/20260819-hch_not_export-v1-1-af4b0de70e13@debian.org
---
net/socket.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index 63c69a0fa74e1..ba3eca4324e7b 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2371,7 +2371,6 @@ int do_sock_setsockopt(struct socket *sock, bool compat, int level,
out_put:
return err;
}
-EXPORT_SYMBOL(do_sock_setsockopt);
/* Set a socket option. Because we don't know the option lengths we have
* to pass the user mode parameter for the protocols to sort out.
@@ -2484,7 +2483,6 @@ int do_sock_getsockopt(struct socket *sock, bool compat, int level,
return err;
}
-EXPORT_SYMBOL(do_sock_getsockopt);
/*
* Get a socket option. Because we don't know the option lengths we have
---
base-commit: 564973a259ec76f2dad0853420e7034cc43994c4
change-id: 20260819-hch_not_export-908dcceab01f
Best regards,
--
Breno Leitao [off-list ref]