From d8fe0b1fc2f592e5f0b56c2d9a31a46d989ecdf1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 20 Oct 2021 16:56:32 +0200 Subject: [PATCH] Revert "ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle" This reverts commit 4d3095647872844a0449478beaf61db24cad779f. The hooks android_rvh_nf_conn_alloc and android_rvh_nf_conn_free were not used by any vendor, so remove them to help with merge issues with future LTS releases. If this is needed by any real user, it can easily be reverted to add it back and then the symbol should be added to the abi list at the same time to prevent it from being removed again later. Bug: 203756332 Bug: 171013716 Cc: Vignesh Saravanaperumal Signed-off-by: Greg Kroah-Hartman Change-Id: I069a798036056feadb2c933da42d405b7bf22cd4 --- drivers/android/vendor_hooks.c | 2 -- include/trace/hooks/net.h | 6 +----- net/netfilter/nf_conntrack_core.c | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 8d79781cd6a4..bdfd287971c6 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -89,8 +89,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_prepare_prio_fork); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_finish_prio_fork); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_user_nice); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_setscheduler); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_nf_conn_alloc); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_nf_conn_free); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_arch_set_freq_scale); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_is_fpsimd_save); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_init); diff --git a/include/trace/hooks/net.h b/include/trace/hooks/net.h index 6296d57d4b2a..acb2fd2c7e07 100644 --- a/include/trace/hooks/net.h +++ b/include/trace/hooks/net.h @@ -18,12 +18,8 @@ DECLARE_HOOK(android_vh_ptype_head, DECLARE_HOOK(android_vh_kfree_skb, TP_PROTO(struct sk_buff *skb), TP_ARGS(skb)); -struct nf_conn; +struct nf_conn; /* needed for CRC preservation */ struct sock; /* needed for CRC preservation */ -DECLARE_RESTRICTED_HOOK(android_rvh_nf_conn_alloc, - TP_PROTO(struct nf_conn *nf_conn), TP_ARGS(nf_conn), 1); -DECLARE_RESTRICTED_HOOK(android_rvh_nf_conn_free, - TP_PROTO(struct nf_conn *nf_conn), TP_ARGS(nf_conn), 1); /* macro versions of hooks are no longer required */ diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index c8a2e09a9182..be821c274325 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -1496,8 +1496,6 @@ __nf_conntrack_alloc(struct net *net, nf_ct_zone_add(ct, zone); - trace_android_rvh_nf_conn_alloc(ct); - /* Because we use RCU lookups, we set ct_general.use to zero before * this is inserted in any list. */ @@ -1530,7 +1528,6 @@ void nf_conntrack_free(struct nf_conn *ct) nf_ct_ext_destroy(ct); kmem_cache_free(nf_conntrack_cachep, ct); smp_mb__before_atomic(); - trace_android_rvh_nf_conn_free(ct); atomic_dec(&net->ct.count); } EXPORT_SYMBOL_GPL(nf_conntrack_free);