From: Cong Wang Date: Wed, 15 Oct 2014 21:33:20 +0000 (-0700) Subject: ipv4: call __ip_options_echo() in cookie_v4_check() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2077eebf7d8bf20b36524de45851e28111a60c52;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ipv4: call __ip_options_echo() in cookie_v4_check() 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 Cc: Eric Dumazet Reported-by: Krzysztof Kolasa Tested-by: Krzysztof Kolasa Signed-off-by: Cong Wang Signed-off-by: Cong Wang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 0431a8f3c8f4..7e7401cdb9d7 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; }