skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE()
Subsystems (2)
Jakub Kicinski
maintainerPATCH 1/1 skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE()
Very few drivers actually have Kconfig knobs for adding -DDEBUG. 8 according to a quick grep, while there are 93 users of skb_checksum_none_assert(). Switch to the new DEBUG_NET_WARN_ON_ONCE() to catch bad skbs.
---
CC: [email protected]
--- include/linux/skbuff.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
include/linux/skbuff.h +1 -3
@@ -5048,9 +5048,7 @@ static inline void skb_forward_csum(struct sk_buff *skb)*/ static inline void skb_checksum_none_assert (const struct sk_buff *skb) { -#ifdef DEBUG -BUG_ON (skb->ip_summed !=CHECKSUM_NONE ); -#endif +DEBUG_NET_WARN_ON_ONCE (skb->ip_summed !=CHECKSUM_NONE ); }bool skb_partial_csum_set (struct sk_buff *skb,u16 start,u16 off);
Signature · 1 line
2.34.3
Quoted 8 lines · Jakub Kicinski
Very few drivers actually have
Kconfigknobs for adding -DDEBUG. 8 according to a quick grep, while there are 93 users ofskb_checksum_none_assert(). Switch to the newDEBUG_NET_WARN_ON_ONCE()to catch bad skbs.Signed-off-by Jakub Kicinski <[email protected]>---
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 11 May 2022 10:23:05 -0700 you wrote:
Very few drivers actually have
Kconfigknobs for adding -DDEBUG. 8 according to a quick grep, while there are 93 users ofskb_checksum_none_assert(). Switch to the newDEBUG_NET_WARN_ON_ONCE()to catch bad skbs.Signed-off-by Jakub Kicinski <[email protected]>[...]
Here is the summary with links:
- [net-next] skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE()
https://git.kernel.org/netdev/net-next/c/0df65743537d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html