Netdev List
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Eric Dumazet <edumazet@google.com>,
	 Kuniyuki Iwashima <kuniyu@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	 Willem de Bruijn <willemb@google.com>,
	 "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	 Simon Horman <horms@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	 Martin KaFai Lau <martin.lau@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	 kernel-team@meta.com, Christoph Hellwig <hch@lst.de>,
	 Breno Leitao <leitao@debian.org>
Subject: [PATCH net] net/socket: remove unused do_sock_{set,get}sockopt() exports
Date: Wed, 19 Aug 2026 06:15:35 -0700	[thread overview]
Message-ID: <20260819-hch_not_export-v1-1-af4b0de70e13@debian.org> (raw)

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 export.

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/
Signed-off-by: Breno Leitao <leitao@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 <leitao@debian.org>


             reply	other threads:[~2026-08-19 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 13:15 Breno Leitao [this message]
2026-08-19 14:27 ` [PATCH net] net/socket: remove unused do_sock_{set,get}sockopt() exports Christoph Hellwig
2026-08-19 15:07   ` Breno Leitao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819-hch_not_export-v1-1-af4b0de70e13@debian.org \
    --to=leitao@debian.org \
    --cc=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hch@lst.de \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox