Skip to content

Commit

Permalink
net: Stop warning about SO_BSDCOMPAT usage
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Miaohe Lin authored and David S. Miller committed Aug 19, 2020
1 parent 487eb2b commit f4ecc74
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f4ecc74

Please sign in to comment.