4.9.208-stable review
Subsystems (5)
Greg Kroah-Hartman
maintainerPATCH 169/171 tcp: do not send empty skb from tcp_write_xmit()
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 1f85e6267caca44b30c54711652b0726fadbb131 ]
Backport of commit fdfc5c8594c2 ("tcp: remove empty skb from write queue in error cases") in linux-4.14 stable triggered various bugs. One of them has been fixed in commit ba2ddb43f270 ("tcp: Don't dequeue SYN/FIN-segments from write-queue"), but we still have crashes in some occasions.
Root-cause is that when tcp_sendmsg() has allocated a fresh skb and could not append a fragment before being blocked in sk_stream_wait_memory(), tcp_write_xmit() might be called and decide to send this fresh and empty skb.
Sending an empty packet is not only silly, it might have caused many issues we had in the past with tp->packets_out being out of sync.
--- net/ipv4/tcp_output.c | 8 ++++++++ 1 file changed, 8 insertions(+)
net/ipv4/tcp_output.c +8 -0
@@ -2233,6 +2233,14 @@ static bool tcp_write_xmit(struct sock *if (tcp_small_queue_check (sk, skb,0 ))break ; +/* Argh, we hit an empty skb(), presumably a thread +* is sleeping in sendmsg()/sk_stream_wait_memory(). +* We do not want to send a pure-ack packet and have +* a strange looking rtx queue with empty packet(s). +*/ +if (TCP_SKB_CB (skb)->end_seq ==TCP_SKB_CB (skb)->seq) +break ; +if (unlikely (tcp_transmit_skb (sk, skb,1 , gfp)))break ;
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.208 release. There are 171 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 04 Jan 2020 22:02:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.208-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 4.9.208-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.9.y
git commit: ea0b96c2917ea73aa7b141bc3b5be3b157aea5c7
git describe: v4.9.207-172-gea0b96c2917e
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.9-oe/build/v4.9.207-172-gea0b96c2917e
No regressions (compared to build v4.9.207)
No fixes (compared to build v4.9.207)
Ran 21320 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* perf
* ltp-cve-tests
* ltp-syscalls-tests
* network-basic-tests
* spectre-meltdown-checker-test
* v4l2-compliance
* ltp-open-posix-tests
* kvm-unit-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
* prep-tmp-disk
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerPATCH 170/171 gtp: fix wrong condition in gtp_genl_dump_pdp()
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit 94a6d9fb88df43f92d943c32b84ce398d50bf49f ]
gtp_genl_dump_pdp() is ->dumpit() callback of GTP module and it is used to dump pdp contexts. it would be re-executed because of dump packet size.
If dump packet size is too big, it saves current dump pointer (gtp interface pointer, bucket, TID value) then it restarts dump from last pointer.
Current GTP code allows adding zero TID pdp context but dump code ignores zero TID value. So, last dump pointer will not be found.
In addition, this patch adds missing rcu_read_lock() in gtp_genl_dump_pdp().
--- drivers/net/gtp.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-)
drivers/net/gtp.c +19 -17
@@ -42,7 +42,6 @@ struct pdp_ctx {struct hlist_node hlist_addr; union { -u64 tid; struct { u64 tid; u16 flow;
@@ -1221,43 +1220,46 @@ static int gtp_genl_dump_pdp(struct sk_b struct netlink_callback *cb) {struct gtp_dev *last_gtp = (struct gtp_dev *)cb->args[2 ], *gtp; +int i, j, bucket = cb->args[0 ], skip = cb->args[1 ];struct net *net =sock_net (skb->sk); -struct gtp_net *gn =net_generic (net, gtp_net_id); -unsigned long tid = cb->args[1 ]; -int i, k = cb->args[0 ], ret;struct pdp_ctx *pctx; +struct gtp_net *gn; + + gn =net_generic (net, gtp_net_id);if (cb->args[4 ])return 0 ; +rcu_read_lock ();list_for_each_entry_rcu (gtp, &gn->gtp_dev_list, list) {if (last_gtp && last_gtp != gtp)continue ;else last_gtp =NULL ; -for (i = k; i < gtp->hash_size; i++) { -hlist_for_each_entry_rcu (pctx, >p->tid_hash[i], hlist_tid) { -if (tid && tid != pctx->u.tid) -continue ; -else - tid =0 ; - - ret =gtp_genl_fill_info (skb, -NETLINK_CB (cb->skb).portid, - cb->nlh->nlmsg_seq, - cb->nlh->nlmsg_type, pctx); -if (ret <0 ) { +for (i = bucket; i < gtp->hash_size; i++) { + j =0 ; +hlist_for_each_entry_rcu (pctx, >p->tid_hash[i], + hlist_tid) { +if (j >= skip && +gtp_genl_fill_info (skb, +NETLINK_CB (cb->skb).portid, + cb->nlh->nlmsg_seq, + cb->nlh->nlmsg_type, pctx)) { cb->args[0 ] = i; - cb->args[1 ] = pctx->u.tid; + cb->args[1 ] = j; cb->args[2 ] = (unsigned long )gtp; goto out; } + j++; } + skip =0 ; } + bucket =0 ; } cb->args[4 ] =1 ; out: +rcu_read_unlock ();return skb->len; }
Greg Kroah-Hartman
maintainerPATCH 171/171 gtp: avoid zero size hashtable
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit 6a902c0f31993ab02e1b6ea7085002b9c9083b6a ]
GTP default hashtable size is 1024 and userspace could set specific hashtable size with IFLA_GTP_PDP_HASHSIZE. If hashtable size is set to 0 from userspace, hashtable will not work and panic will occur.
--- drivers/net/gtp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/gtp.c +5 -2
@@ -677,10 +677,13 @@ static int gtp_newlink(struct net *src_nif (err <0 ) goto out_err; -if (!data[IFLA_GTP_PDP_HASHSIZE ]) +if (!data[IFLA_GTP_PDP_HASHSIZE ]) { hashsize =1024 ; -else + }else { hashsize =nla_get_u32 (data[IFLA_GTP_PDP_HASHSIZE ]); +if (!hashsize) + hashsize =1024 ; + } err =gtp_hashtable_new (gtp, hashsize);if (err <0 )
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.208 release. There are 171 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 04 Jan 2020 22:02:15 +0000. Anything received after that time might be too late.
Build results:
total: 172 pass: 172 fail: 0 Qemu test results: total: 357 pass: 357 fail: 0
Guenter
Jon Hunter
maintainerQuoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.208 release. There are 171 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 04 Jan 2020 22:02:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.208-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.
Quoted 5 lines
thanks,
greg k-h
-------------
All tests are passing for Tegra ...
Test results for stable-v4.9:
8 builds: 8 pass, 0 fail
16 boots: 16 pass, 0 fail
24 tests: 24 pass, 0 failLinux version: 4.9.208-rc1-gea0b96c2917e
Boards tested: tegra124-jetson-tk1, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04
Cheers
Jon
Signature · 1 line
nvpublic
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.208 release. There are 171 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 04 Jan 2020 22:02:15 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.208-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah