This is a note to let you know that I've just added the patch titled
tcp: fix tcp_md5_hash_skb_data()
to the 3.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tcp-fix-tcp_md5_hash_skb_data.patch
and it can be found in the queue-3.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 0fdefe46a0af027d26bf6773e380afc772b61ffb Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Mon, 13 May 2013 21:25:52 +0000
Subject: tcp: fix tcp_md5_hash_skb_data()
From: Eric Dumazet <[email protected]>
[ Upstream commit 54d27fcb338bd9c42d1dfc5a39e18f6f9d373c2e ]
TCP md5 communications fail [1] for some devices, because sg/crypto code
assume page offsets are below PAGE_SIZE.
This was discovered using mlx4 driver [2], but I suspect loopback
might trigger the same bug now we use order-3 pages in tcp_sendmsg()
[1] Failure is giving following messages.
huh, entered softirq 3 NET_RX ffffffff806ad230 preempt_count 00000100,
exited with 00000101?
[2] mlx4 driver uses order-2 pages to allocate RX frags
Reported-by: Matt Schnall <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Bernhard Beck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/ipv4/tcp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3383,8 +3383,11 @@ int tcp_md5_hash_skb_data(struct tcp_md5
for (i = 0; i < shi->nr_frags; ++i) {
const struct skb_frag_struct *f = &shi->frags[i];
- struct page *page = skb_frag_page(f);
- sg_set_page(&sg, page, skb_frag_size(f), f->page_offset);
+ unsigned int offset = f->page_offset;
+ struct page *page = skb_frag_page(f) + (offset >> PAGE_SHIFT);
+
+ sg_set_page(&sg, page, skb_frag_size(f),
+ offset_in_page(offset));
if (crypto_hash_update(desc, &sg, skb_frag_size(f)))
return 1;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.9/packet-set-transport-header-before-doing-xmit.patch
queue-3.9/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
queue-3.9/netback-set-transport-header-before-passing-it-to-kernel.patch
queue-3.9/tcp-xps-fix-reordering-issues.patch
queue-3.9/net_sched-restore-overhead-xxx-handling.patch
queue-3.9/net_sched-better-precise-estimation-on-packet-length-for-untrusted-packets.patch
queue-3.9/ip_tunnel-fix-kernel-panic-with-icmp_dest_unreach.patch
queue-3.9/tcp-fix-tcp_md5_hash_skb_data.patch
queue-3.9/net_sched-htb-do-not-mix-1ns-and-64ns-time-units.patch
queue-3.9/tuntap-set-transport-header-before-passing-it-to-kernel.patch
queue-3.9/tuntap-correct-the-return-value-in-tun_set_iff.patch
queue-3.9/net-force-a-reload-of-first-item-in-hlist_nulls_for_each_entry_rcu.patch
queue-3.9/macvtap-set-transport-header-before-passing-skb-to-lower-device.patch
queue-3.9/net-802-mrp-fix-lockdep-splat.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html