Re: [PATCH net v2] net/socket: remove unused do_sock_{set,get}sockopt() exports
From: Eric Dumazet
Date: Fri Aug 21 2026 - 05:02:35 EST
On Fri, Aug 21, 2026 at 10:29 AM Breno Leitao <leitao@xxxxxxxxxx> wrote:
>
> 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@xxxxxx>
> Link: https://lore.kernel.org/all/20260819090439.GB9267@xxxxxx/
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>