From c1e292ea7c7c3ae2c92066d7e349a64ad3b6d90d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 14 Jan 2022 07:30:49 +0100 Subject: [PATCH] ANDROID: remove the android_vh_kfree_skb tracehook The network stack already provides a built-in skb tracepoint that can be used for tracing the lifecycle of a skb, no need to add an android-specific one as well, that just duplicates the same logic and causes merge conflicts with upstream changes. Bug: 163716381 Cc: Bae Soukjin Signed-off-by: Greg Kroah-Hartman Change-Id: Ie1770c59d3e70d9a47e93b645134ae85630f240a --- drivers/android/vendor_hooks.c | 1 - include/trace/hooks/net.h | 3 --- net/core/skbuff.c | 1 - net/ipv4/tcp_input.c | 1 - 4 files changed, 6 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 380ce272f693..348239e21e4f 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -145,7 +145,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_iommu_setup_dma_ops); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_iommu_iovad_alloc_iova); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_iommu_iovad_free_iova); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kfree_skb); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_timer_calc_index); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_allow_domain_state); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_enter); diff --git a/include/trace/hooks/net.h b/include/trace/hooks/net.h index 31e0f21373e8..b4c1dd38e735 100644 --- a/include/trace/hooks/net.h +++ b/include/trace/hooks/net.h @@ -11,12 +11,9 @@ struct packet_type; struct list_head; -struct sk_buff; DECLARE_HOOK(android_vh_ptype_head, TP_PROTO(const struct packet_type *pt, struct list_head *vendor_pt), TP_ARGS(pt, vendor_pt)); -DECLARE_HOOK(android_vh_kfree_skb, - TP_PROTO(struct sk_buff *skb), TP_ARGS(skb)); /* macro versions of hooks are no longer required */ diff --git a/net/core/skbuff.c b/net/core/skbuff.c index ef6d0468ee0f..82f7a75b16e2 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -771,7 +771,6 @@ void kfree_skb(struct sk_buff *skb) if (!skb_unref(skb)) return; - trace_android_vh_kfree_skb(skb); trace_kfree_skb(skb, __builtin_return_address(0)); __kfree_skb(skb); } diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index cd9374911f7e..e3a602182695 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4685,7 +4685,6 @@ static bool tcp_ooo_try_coalesce(struct sock *sk, static void tcp_drop(struct sock *sk, struct sk_buff *skb) { - trace_android_vh_kfree_skb(skb); sk_drops_add(sk, skb); __kfree_skb(skb); }