Re: TCP-MD5 checksum failure on x86_64 SMP

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Wednesday, May 5, 2010 - 11:53 am

Le mercredi 05 mai 2010 à 23:33 +0530, Bhaskar Dutta a écrit :


I am not familiar with this code, but I suspect same per_cpu data can be
used at both time by a sender (process context) and by a receiver
(softirq context).

To trigger this, you need at least two active md5 sockets.

tcp_get_md5sig_pool() should probably disable bh to make sure current
cpu wont be preempted by softirq processing


Something like :

diff --git a/include/net/tcp.h b/include/net/tcp.h
index fb5c66b..e232123 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1221,12 +1221,15 @@ struct tcp_md5sig_pool          *tcp_get_md5sig_pool(void)
 	struct tcp_md5sig_pool *ret = __tcp_get_md5sig_pool(cpu);
 	if (!ret)
 		put_cpu();
+	else
+		local_bh_disable();
 	return ret;
 }
 
 static inline void             tcp_put_md5sig_pool(void)
 {
 	__tcp_put_md5sig_pool();
+	local_bh_enable();
 	put_cpu();
 }


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
TCP-MD5 checksum failure on x86_64 SMP, Bhaskar Dutta, (Mon May 3, 8:30 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Ben Hutchings, (Tue May 4, 4:32 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bhaskar Dutta, (Tue May 4, 7:28 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Stephen Hemminger, (Tue May 4, 9:12 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bhaskar Dutta, (Tue May 4, 10:08 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Stephen Hemminger, (Tue May 4, 10:13 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bhaskar Dutta, (Wed May 5, 11:03 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Wed May 5, 11:53 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bhaskar Dutta, (Thu May 6, 4:55 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Thu May 6, 5:06 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, David Miller, (Thu May 6, 10:04 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Thu May 6, 10:32 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Thu May 6, 10:39 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Fri May 7, 1:00 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Lars Eggert, (Fri May 7, 1:46 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Fri May 7, 1:55 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bhaskar Dutta, (Fri May 7, 1:59 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, David Miller, (Fri May 7, 2:12 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Fri May 7, 2:37 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bhaskar Dutta, (Fri May 7, 3:50 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Fri May 7, 8:18 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Fri May 7, 8:44 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Stephen Hemminger, (Fri May 7, 10:14 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Fri May 7, 10:21 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Stephen Hemminger, (Fri May 7, 10:36 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Fri May 7, 2:18 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Fri May 7, 2:40 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bijay Singh, (Mon May 10, 7:55 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Mon May 10, 8:18 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bijay Singh, (Mon May 10, 10:27 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bijay Singh, (Mon May 10, 9:08 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Mon May 10, 11:27 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bijay Singh, (Tue May 11, 1:23 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Tue May 11, 1:50 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Tue May 11, 8:20 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Stephen Hemminger, (Wed May 12, 3:22 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, David Miller, (Wed May 12, 3:24 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, David Miller, (Sun May 16, 12:30 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, David Miller, (Sun May 16, 12:35 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, David Miller, (Sun May 16, 12:37 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Sun May 16, 12:53 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Sun May 16, 1:48 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Bijay Singh, (Sun May 16, 8:49 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Eric Dumazet, (Sun May 16, 10:03 pm)
Re: TCP-MD5 checksum failure on x86_64 SMP, Stephen Hemminger, (Mon May 17, 10:22 am)
Re: TCP-MD5 checksum failure on x86_64 SMP, Stephen Hemminger, (Mon May 17, 1:42 pm)
[PATCH] tcp: tcp_synack_options() fix, Eric Dumazet, (Mon May 17, 2:04 pm)
Re: [PATCH] tcp: tcp_synack_options() fix, David Miller, (Mon May 17, 10:35 pm)