Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] net: Stop warning about SO_BSDCOMPAT usage
@ 2020-08-19 8:32 Miaohe Lin
2020-08-19 19:54 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Miaohe Lin @ 2020-08-19 8:32 UTC (permalink / raw)
To: davem, kuba, edumazet, kafai, daniel, jakub, keescook, zhang.lin16
Cc: netdev, linux-kernel, linmiaohe
We've been warning about SO_BSDCOMPAT usage for many years. We may remove
this code completely now.
Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
net/core/sock.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index e4f40b175acb..64d2aec5ed45 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -413,18 +413,6 @@ static int sock_set_timeout(long *timeo_p, sockptr_t optval, int optlen,
return 0;
}
-static void sock_warn_obsolete_bsdism(const char *name)
-{
- static int warned;
- static char warncomm[TASK_COMM_LEN];
- if (strcmp(warncomm, current->comm) && warned < 5) {
- strcpy(warncomm, current->comm);
- pr_warn("process `%s' is using obsolete %s SO_BSDCOMPAT\n",
- warncomm, name);
- warned++;
- }
-}
-
static bool sock_needs_netstamp(const struct sock *sk)
{
switch (sk->sk_family) {
@@ -984,7 +972,6 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
break;
case SO_BSDCOMPAT:
- sock_warn_obsolete_bsdism("setsockopt");
break;
case SO_PASSCRED:
@@ -1387,7 +1374,6 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
break;
case SO_BSDCOMPAT:
- sock_warn_obsolete_bsdism("getsockopt");
break;
case SO_TIMESTAMP_OLD:
--
2.19.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] net: Stop warning about SO_BSDCOMPAT usage
2020-08-19 8:32 [PATCH v2] net: Stop warning about SO_BSDCOMPAT usage Miaohe Lin
@ 2020-08-19 19:54 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-08-19 19:54 UTC (permalink / raw)
To: linmiaohe
Cc: kuba, edumazet, kafai, daniel, jakub, keescook, zhang.lin16,
netdev, linux-kernel
From: Miaohe Lin <linmiaohe@huawei.com>
Date: Wed, 19 Aug 2020 04:32:08 -0400
> We've been warning about SO_BSDCOMPAT usage for many years. We may remove
> this code completely now.
>
> Suggested-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Applied to net-next, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-19 19:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 8:32 [PATCH v2] net: Stop warning about SO_BSDCOMPAT usage Miaohe Lin
2020-08-19 19:54 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).