All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch: nfqnl_mangle skb_trim
@ 2006-09-27 15:31 James D. Nurmi
  2006-09-29 13:47 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: James D. Nurmi @ 2006-09-27 15:31 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Hi all,

I've got some code very dependant on nfnetlink_queue, and turned up a
large number of warns coming from skb_trim.  While it's quite possibly
my code, having not seen it on older kernels made me a bit suspect.

Anyhow, based on some googling I turned up this thread:
http://lkml.org/lkml/2006/8/13/56

And believe the issue to be related, so attached is a small patch to
the kernel -- not sure if this is completely correct, but for anyone
else hitting the WARN_ON(1) in skbuff.h, it might be helpful..

Cheers,

James

[-- Attachment #2: fix_skb_trim.2.6.18-patch --]
[-- Type: application/octet-stream, Size: 352 bytes --]

--- net/netfilter/nfnetlink_queue.c.orig	2006-09-27 08:23:18.000000000 -0700
+++ net/netfilter/nfnetlink_queue.c	2006-09-27 08:08:52.000000000 -0700
@@ -623,7 +623,7 @@
 
 	diff = data_len - e->skb->len;
 	if (diff < 0)
-		skb_trim(e->skb, data_len);
+		pskb_trim(e->skb, data_len);
 	else if (diff > 0) {
 		if (data_len > 0xFFFF)
 			return -EINVAL;

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

end of thread, other threads:[~2006-09-29 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-27 15:31 Patch: nfqnl_mangle skb_trim James D. Nurmi
2006-09-29 13:47 ` Patrick McHardy

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.