netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net 1/3] ipv4: call __ip_options_echo() in cookie_v4_check()
@ 2014-10-15 21:33 Cong Wang
  2014-10-15 21:33 ` [Patch net 2/3] ipv4: share tcp_v4_save_options() with cookie_v4_check() Cong Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Cong Wang @ 2014-10-15 21:33 UTC (permalink / raw)
  To: netdev; +Cc: davem, Cong Wang, Krzysztof Kolasa, Eric Dumazet, Cong Wang

From: Cong Wang <cwang@twopensource.com>

commit 971f10eca186cab238c49da ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
missed that cookie_v4_check() still calls ip_options_echo() which uses
IPCB(). It should use TCPCB() at TCP layer, so call __ip_options_echo()
instead.

Fixes: commit 971f10eca186cab238c49da ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
Cc: Krzysztof Kolasa <kkolasa@winsoft.pl>
Cc: Eric Dumazet <edumazet@google.com>
Reported-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
Tested-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/ipv4/syncookies.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 0431a8f..7e7401c 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -321,7 +321,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
 		int opt_size = sizeof(struct ip_options_rcu) + opt->optlen;
 
 		ireq->opt = kmalloc(opt_size, GFP_ATOMIC);
-		if (ireq->opt != NULL && ip_options_echo(&ireq->opt->opt, skb)) {
+		if (ireq->opt != NULL && __ip_options_echo(&ireq->opt->opt, skb, opt)) {
 			kfree(ireq->opt);
 			ireq->opt = NULL;
 		}
-- 
1.8.3.1

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

end of thread, other threads:[~2014-10-17 16:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-15 21:33 [Patch net 1/3] ipv4: call __ip_options_echo() in cookie_v4_check() Cong Wang
2014-10-15 21:33 ` [Patch net 2/3] ipv4: share tcp_v4_save_options() with cookie_v4_check() Cong Wang
2014-10-16  4:16   ` Eric Dumazet
2014-10-17 16:18   ` David Miller
2014-10-15 21:33 ` [Patch net 3/3] ipv4: clean up cookie_v4_check() Cong Wang
2014-10-16  4:17   ` Eric Dumazet
2014-10-17 16:18   ` David Miller
2014-10-16  4:15 ` [Patch net 1/3] ipv4: call __ip_options_echo() in cookie_v4_check() Eric Dumazet
2014-10-17 16:18 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).