diff options
author | Alexander Aring <aahringo@redhat.com> | 2021-06-27 18:48:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-29 11:28:21 -0700 |
commit | e3ae2365efc14269170a6326477e669332271ab3 (patch) | |
tree | 336e988ed36c0b1078d5f0aebcfe59e23482fe7d /net/core | |
parent | 7f4e5c5b8cb00138ad1a10cab87bbd1e2d4d3376 (diff) |
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/core')
-rw-r--r-- | net/core/skbuff.c | 6 | ||||
-rw-r--r-- | net/core/sock.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 2531ac4ffa69..12aabcda6db2 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1294,7 +1294,7 @@ static void __msg_zerocopy_callback(struct ubuf_info *uarg) } spin_unlock_irqrestore(&q->lock, flags); - sk->sk_error_report(sk); + sk_error_report(sk); release: consume_skb(skb); @@ -4685,7 +4685,7 @@ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) skb_queue_tail(&sk->sk_error_queue, skb); if (!sock_flag(sk, SOCK_DEAD)) - sk->sk_error_report(sk); + sk_error_report(sk); return 0; } EXPORT_SYMBOL(sock_queue_err_skb); @@ -4716,7 +4716,7 @@ struct sk_buff *sock_dequeue_err_skb(struct sock *sk) sk->sk_err = 0; if (skb_next) - sk->sk_error_report(sk); + sk_error_report(sk); return skb; } diff --git a/net/core/sock.c b/net/core/sock.c index a2337b37eba6..c30f8f4cbb22 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -331,6 +331,12 @@ int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) } EXPORT_SYMBOL(__sk_backlog_rcv); +void sk_error_report(struct sock *sk) +{ + sk->sk_error_report(sk); +} +EXPORT_SYMBOL(sk_error_report); + static int sock_get_timeout(long timeo, void *optval, bool old_timeval) { struct __kernel_sock_timeval tv; |