lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Jul 2021 11:56:05 +0800
From:   Yajun Deng <yajun.deng@...ux.dev>
To:     davem@...emloft.net, kuba@...nel.org
Cc:     herbert@...dor.apana.org.au, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, Yajun Deng <yajun.deng@...ux.dev>
Subject: [PATCH] Revert "net: Get rid of consume_skb when tracing is off"

This reverts commit be769db2f95861cc8c7c8fedcc71a8c39b803b10.
There is trace_kfree_skb() in kfree_skb(), the trace_kfree_skb() is
also a trace function.

Fixes: be769db2f958 (net: Get rid of consume_skb when tracing is off)
Signed-off-by: Yajun Deng <yajun.deng@...ux.dev>
---
 include/linux/skbuff.h | 9 ---------
 net/core/skbuff.c      | 2 --
 2 files changed, 11 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f19190820e63..da897d455d58 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1072,16 +1072,7 @@ void kfree_skb(struct sk_buff *skb);
 void kfree_skb_list(struct sk_buff *segs);
 void skb_dump(const char *level, const struct sk_buff *skb, bool full_pkt);
 void skb_tx_error(struct sk_buff *skb);
-
-#ifdef CONFIG_TRACEPOINTS
 void consume_skb(struct sk_buff *skb);
-#else
-static inline void consume_skb(struct sk_buff *skb)
-{
-	return kfree_skb(skb);
-}
-#endif
-
 void __consume_stateless_skb(struct sk_buff *skb);
 void  __kfree_skb(struct sk_buff *skb);
 extern struct kmem_cache *skbuff_head_cache;
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index fc7942c0dddc..f4c6529ce6b9 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -893,7 +893,6 @@ void skb_tx_error(struct sk_buff *skb)
 }
 EXPORT_SYMBOL(skb_tx_error);
 
-#ifdef CONFIG_TRACEPOINTS
 /**
  *	consume_skb - free an skbuff
  *	@skb: buffer to free
@@ -911,7 +910,6 @@ void consume_skb(struct sk_buff *skb)
 	__kfree_skb(skb);
 }
 EXPORT_SYMBOL(consume_skb);
-#endif
 
 /**
  *	__consume_stateless_skb - free an skbuff, assuming it is stateless
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ