From 9c23df03f12f775dd3920f85655f701f7c9a8529 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 21 Feb 2019 08:25:26 +0100 Subject: [PATCH] fix up networking commit in 4.20 and 4.19 queue --- ...ate-page-fragments-that-are-not-skb-.patch | 12 ++++------- ...cp-tcp_v4_err-should-be-more-careful.patch | 20 +++++++++++-------- ...cp-tcp_v4_err-should-be-more-careful.patch | 20 +++++++++++-------- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/queue-4.19/net-do-not-allocate-page-fragments-that-are-not-skb-.patch b/queue-4.19/net-do-not-allocate-page-fragments-that-are-not-skb-.patch index 327e6f1848a..7a2de8b9d5e 100644 --- a/queue-4.19/net-do-not-allocate-page-fragments-that-are-not-skb-.patch +++ b/queue-4.19/net-do-not-allocate-page-fragments-that-are-not-skb-.patch @@ -17,15 +17,14 @@ Reported-by: Jann Horn Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman --- - net/core/skbuff.c | 4 ++++ + net/core/skbuff.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 589ec5b9ec5f5..8656b1e20d35a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -353,6 +353,8 @@ static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask) +@@ -353,6 +353,8 @@ static void *__netdev_alloc_frag(unsigne */ void *netdev_alloc_frag(unsigned int fragsz) { @@ -34,7 +33,7 @@ index 589ec5b9ec5f5..8656b1e20d35a 100644 return __netdev_alloc_frag(fragsz, GFP_ATOMIC); } EXPORT_SYMBOL(netdev_alloc_frag); -@@ -366,6 +368,8 @@ static void *__napi_alloc_frag(unsigned int fragsz, gfp_t gfp_mask) +@@ -366,6 +368,8 @@ static void *__napi_alloc_frag(unsigned void *napi_alloc_frag(unsigned int fragsz) { @@ -43,6 +42,3 @@ index 589ec5b9ec5f5..8656b1e20d35a 100644 return __napi_alloc_frag(fragsz, GFP_ATOMIC); } EXPORT_SYMBOL(napi_alloc_frag); --- -2.19.1 - diff --git a/queue-4.19/tcp-tcp_v4_err-should-be-more-careful.patch b/queue-4.19/tcp-tcp_v4_err-should-be-more-careful.patch index 93a067eb033..eef3ebb7708 100644 --- a/queue-4.19/tcp-tcp_v4_err-should-be-more-careful.patch +++ b/queue-4.19/tcp-tcp_v4_err-should-be-more-careful.patch @@ -18,15 +18,14 @@ Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman --- - net/ipv4/tcp_ipv4.c | 4 ++++ - 1 file changed, 4 insertions(+) + net/ipv4/tcp_ipv4.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c -index cd426313a2981..4370ef1d547e1 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c -@@ -535,6 +535,10 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info) +@@ -535,14 +535,15 @@ void tcp_v4_err(struct sk_buff *icmp_skb if (sock_owned_by_user(sk)) break; @@ -37,6 +36,11 @@ index cd426313a2981..4370ef1d547e1 100644 icsk->icsk_backoff--; icsk->icsk_rto = tp->srtt_us ? __tcp_set_rto(tp) : TCP_TIMEOUT_INIT; --- -2.19.1 - + icsk->icsk_rto = inet_csk_rto_backoff(icsk, TCP_RTO_MAX); + +- skb = tcp_rtx_queue_head(sk); +- BUG_ON(!skb); +- + tcp_mstamp_refresh(tp); + delta_us = (u32)(tp->tcp_mstamp - skb->skb_mstamp); + remaining = icsk->icsk_rto - diff --git a/queue-4.20/tcp-tcp_v4_err-should-be-more-careful.patch b/queue-4.20/tcp-tcp_v4_err-should-be-more-careful.patch index 01f2db11c22..3e172c66de6 100644 --- a/queue-4.20/tcp-tcp_v4_err-should-be-more-careful.patch +++ b/queue-4.20/tcp-tcp_v4_err-should-be-more-careful.patch @@ -18,15 +18,14 @@ Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman --- - net/ipv4/tcp_ipv4.c | 4 ++++ - 1 file changed, 4 insertions(+) + net/ipv4/tcp_ipv4.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c -index de47038afdf02..daedd75bb7459 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c -@@ -535,6 +535,10 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info) +@@ -535,14 +535,15 @@ void tcp_v4_err(struct sk_buff *icmp_skb if (sock_owned_by_user(sk)) break; @@ -37,6 +36,11 @@ index de47038afdf02..daedd75bb7459 100644 icsk->icsk_backoff--; icsk->icsk_rto = tp->srtt_us ? __tcp_set_rto(tp) : TCP_TIMEOUT_INIT; --- -2.19.1 - + icsk->icsk_rto = inet_csk_rto_backoff(icsk, TCP_RTO_MAX); + +- skb = tcp_rtx_queue_head(sk); +- BUG_ON(!skb); +- + tcp_mstamp_refresh(tp); + delta_us = (u32)(tp->tcp_mstamp - tcp_skb_timestamp_us(skb)); + remaining = icsk->icsk_rto - -- 2.39.5