summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2021-06-27 18:48:21 -0400
committerDavid S. Miller <davem@davemloft.net>2021-06-29 11:28:21 -0700
commite3ae2365efc14269170a6326477e669332271ab3 (patch)
tree336e988ed36c0b1078d5f0aebcfe59e23482fe7d /net/netlink
parent7f4e5c5b8cb00138ad1a10cab87bbd1e2d4d3376 (diff)
downloadlinux-e3ae2365efc14269170a6326477e669332271ab3.tar.gz
linux-e3ae2365efc14269170a6326477e669332271ab3.tar.bz2
linux-e3ae2365efc14269170a6326477e669332271ab3.zip
net: sock: introduce sk_error_report
This patch introduces a function wrapper to call the sk_error_report callback. That will prepare to add additional handling whenever sk_error_report is called, for example to trace socket errors. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 6133e412b948..d233ac4a91b6 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -351,7 +351,7 @@ static void netlink_overrun(struct sock *sk)
if (!test_and_set_bit(NETLINK_S_CONGESTED,
&nlk_sk(sk)->state)) {
sk->sk_err = ENOBUFS;
- sk->sk_error_report(sk);
+ sk_error_report(sk);
}
}
atomic_inc(&sk->sk_drops);
@@ -1576,7 +1576,7 @@ static int do_one_set_err(struct sock *sk, struct netlink_set_err_data *p)
}
sk->sk_err = p->code;
- sk->sk_error_report(sk);
+ sk_error_report(sk);
out:
return ret;
}
@@ -2012,7 +2012,7 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
ret = netlink_dump(sk);
if (ret) {
sk->sk_err = -ret;
- sk->sk_error_report(sk);
+ sk_error_report(sk);
}
}
@@ -2439,7 +2439,7 @@ void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err,
skb = nlmsg_new(payload + tlvlen, GFP_KERNEL);
if (!skb) {
NETLINK_CB(in_skb).sk->sk_err = ENOBUFS;
- NETLINK_CB(in_skb).sk->sk_error_report(NETLINK_CB(in_skb).sk);
+ sk_error_report(NETLINK_CB(in_skb).sk);
return;
}