diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2022-02-07 11:33:35 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-04-06 00:22:09 +0200 |
commit | 1d1b99b4698725b3978cd0a67c5760b479fded72 (patch) | |
tree | 85a329ad9559971293819d3046dc62e3a328c299 | |
parent | 5a3025f28b758f6a6b21837643697a98a9468415 (diff) | |
download | backports-1d1b99b4698725b3978cd0a67c5760b479fded72.tar.gz |
headers: backport sk_error_report
It is required by QRTR.
Backproted from 5.14 and dropped trace_event part as the event
doesn't exist in earlier versions and it won't have functional
impact.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
-rw-r--r-- | backport/backport-include/net/sock.h | 8 | ||||
-rw-r--r-- | backport/compat/backport-genetlink.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/backport/backport-include/net/sock.h b/backport/backport-include/net/sock.h index d99ef794..06a76aec 100644 --- a/backport/backport-include/net/sock.h +++ b/backport/backport-include/net/sock.h @@ -32,4 +32,12 @@ static inline void sk_pacing_shift_update(struct sock *sk, int val) } #endif /* < 4.16 */ +#if LINUX_VERSION_IS_LESS(5,14,0) +static inline void backport_sk_error_report(struct sock *sk) +{ + sk->sk_error_report(sk); +} +#define sk_error_report LINUX_BACKPORT(sk_error_report) +#endif /* <= 5.14 */ + #endif /* __BACKPORT_NET_SOCK_H */ diff --git a/backport/compat/backport-genetlink.c b/backport/compat/backport-genetlink.c index 89cdd9c0..6ba31b6e 100644 --- a/backport/compat/backport-genetlink.c +++ b/backport/compat/backport-genetlink.c @@ -86,7 +86,7 @@ static void extack_netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, 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; } |