Author: maks Date: Tue Dec 11 20:32:09 2007 New Revision: 9942 Log: [net] Add Xu patch: Fix TCP header misalignment.
current stable is a bit erratic, include fix in case it does not come along soon. Added: dists/sid/linux-2.6/debian/patches/bugfix/tcp-header-misalignment.patch Modified: dists/sid/linux-2.6/debian/changelog dists/sid/linux-2.6/debian/patches/series/2 Modified: dists/sid/linux-2.6/debian/changelog ============================================================================== --- dists/sid/linux-2.6/debian/changelog (original) +++ dists/sid/linux-2.6/debian/changelog Tue Dec 11 20:32:09 2007 @@ -13,8 +13,9 @@ [ maximilian attems ] * [ppc] Reenable PMAC_BACKLIGHT. * [sparc] Add davem get_cpu() SunFire boot patch. (closes: #440720) + * [net] Add Xu patch: Fix TCP header misalignment. - -- maximilian attems <[EMAIL PROTECTED]> Mon, 10 Dec 2007 00:24:29 +0100 + -- maximilian attems <[EMAIL PROTECTED]> Tue, 11 Dec 2007 21:09:29 +0100 linux-2.6 (2.6.23-1) unstable; urgency=low Added: dists/sid/linux-2.6/debian/patches/bugfix/tcp-header-misalignment.patch ============================================================================== --- (empty file) +++ dists/sid/linux-2.6/debian/patches/bugfix/tcp-header-misalignment.patch Tue Dec 11 20:32:09 2007 @@ -0,0 +1,46 @@ +Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21df56c6e2372e09c916111efb6c14c372a5ab2e +Commit: 21df56c6e2372e09c916111efb6c14c372a5ab2e +Parent: 483b23ffa3a5f44767038b0a676d757e0668437e +Author: Herbert Xu <[EMAIL PROTECTED]> +AuthorDate: Sun Nov 18 18:48:08 2007 -0800 +Committer: David S. Miller <[EMAIL PROTECTED]> +CommitDate: Sun Nov 18 18:48:08 2007 -0800 + + [TCP]: Fix TCP header misalignment + + Indeed my previous change to alloc_pskb has made it possible + for the TCP header to be misaligned iff the MTU is not a multiple + of 4 (and less than a page). So I suspect the optimised IPsec + MTU calculation is giving you just such an MTU :) + + This patch fixes it by changing alloc_pskb to make sure that + the size is at least 32-bit aligned. This does not cause the + problem fixed by the previous patch because max_header is always + 32-bit aligned which means that in the SG/NOTSO case this will + be a no-op. + + I thought about putting this in the callers but all the current + callers are from TCP. If and when we get a non-TCP caller we + can always create a TCP wrapper for this function and move the + alignment over there. + + Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> + Signed-off-by: David S. Miller <[EMAIL PROTECTED]> +--- + include/net/sock.h | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/include/net/sock.h b/include/net/sock.h +index 567e468..67e35c7 100644 +--- a/include/net/sock.h ++++ b/include/net/sock.h +@@ -1236,6 +1236,9 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, + { + struct sk_buff *skb; + ++ /* The TCP header must be at least 32-bit aligned. */ ++ size = ALIGN(size, 4); ++ + skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp); + if (skb) { + skb->truesize += mem; Modified: dists/sid/linux-2.6/debian/patches/series/2 ============================================================================== --- dists/sid/linux-2.6/debian/patches/series/2 (original) +++ dists/sid/linux-2.6/debian/patches/series/2 Tue Dec 11 20:32:09 2007 @@ -1,3 +1,4 @@ + bugfix/arm/glantank-rtc.patch + features/all/export-gfs2-locking-symbols.patch + bugfix/sparc/sunfire-get_cpu.patch ++ bugfix/tcp-header-misalignment.patch _______________________________________________ Kernel-svn-changes mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes

