All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE()
@ 2022-05-11 17:23 Jakub Kicinski
  2022-05-11 17:30 ` Eric Dumazet
  2022-05-12 23:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-05-11 17:23 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, imagedong

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.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: imagedong@tencent.com
---
 include/linux/skbuff.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index b91d225fdc13..9d82a8b6c8f1 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -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);
-- 
2.34.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE()
  2022-05-11 17:23 [PATCH net-next] skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE() Jakub Kicinski
@ 2022-05-11 17:30 ` Eric Dumazet
  2022-05-12 23:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2022-05-11 17:30 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: David Miller, netdev, Paolo Abeni, Menglong Dong

On Wed, May 11, 2022 at 10:23 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> 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.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---

Reviewed-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE()
  2022-05-11 17:23 [PATCH net-next] skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE() Jakub Kicinski
  2022-05-11 17:30 ` Eric Dumazet
@ 2022-05-12 23:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-12 23:40 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, imagedong

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 11 May 2022 10:23:05 -0700 you wrote:
> 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.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-12 23:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 17:23 [PATCH net-next] skbuff: replace a BUG_ON() with the new DEBUG_NET_WARN_ON_ONCE() Jakub Kicinski
2022-05-11 17:30 ` Eric Dumazet
2022-05-12 23:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.