aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch
diff options
context:
space:
mode:
authorStijn Segers <foss@volatilesystems.org>2018-08-04 18:08:25 +0200
committerJohn Crispin <john@phrozen.org>2018-08-06 07:30:32 +0200
commit9e1530b2a35e051664ed243efd1eac942883494a (patch)
tree8490f4a288ad1637a7e2af63a7864636ea108339 /target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch
parent8be3af93b433bf79a8fee4d41d84a796b5708121 (diff)
downloadupstream-9e1530b2a35e051664ed243efd1eac942883494a.tar.gz
upstream-9e1530b2a35e051664ed243efd1eac942883494a.tar.bz2
upstream-9e1530b2a35e051664ed243efd1eac942883494a.zip
kernel: bump 4.9 to 4.9.117 for 18.06
* Refreshed patches. * Removed patches: - target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch superseded by upstream - target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch superseded by upstream - target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch accepted upstream - target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch * New backported patch to address ext4 breakage, introduced in 4.9.112: - backport-4.9/500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch Also add ARM64_SSBD symbol to ARM64 targets still running kernel 4.9 Thanks to Koen Vandeputte for pointing out the need to add the ARM64_SSBD symbol, and the ext4 patch. Compile-tested on: ar71xx Run-tested on: ar71xx Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Diffstat (limited to 'target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch')
-rw-r--r--target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch49
1 files changed, 0 insertions, 49 deletions
diff --git a/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch b/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch
deleted file mode 100644
index f5ceecca93..0000000000
--- a/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-The gen_stats facility will add a header for the toplevel nlattr of type
-TCA_STATS2 that contains all stats added by qdisc callbacks. A reference
-to this header is stored in the gnet_dump struct, and when all the
-per-qdisc callbacks have finished adding their stats, the length of the
-containing header will be adjusted to the right value.
-
-However, on architectures that need padding (i.e., that don't set
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS), the padding nlattr is added
-before the stats, which means that the stored pointer will point to the
-padding, and so when the header is fixed up, the result is just a very
-big padding nlattr. Because most qdiscs also supply the legacy TCA_STATS
-struct, this problem has been mostly invisible, but we exposed it with
-the netlink attribute-based statistics in CAKE.
-
-Fix the issue by fixing up the stored pointer if it points to a padding
-nlattr.
-
-Tested-by: Pete Heist <pete@heistp.net>
-Tested-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
-Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
----
- net/core/gen_stats.c | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
---- a/net/core/gen_stats.c
-+++ b/net/core/gen_stats.c
-@@ -77,8 +77,20 @@ gnet_stats_start_copy_compat(struct sk_b
- d->lock = lock;
- spin_lock_bh(lock);
- }
-- if (d->tail)
-- return gnet_stats_copy(d, type, NULL, 0, padattr);
-+ if (d->tail) {
-+ int ret = gnet_stats_copy(d, type, NULL, 0, padattr);
-+
-+ /* The initial attribute added in gnet_stats_copy() may be
-+ * preceded by a padding attribute, in which case d->tail will
-+ * end up pointing at the padding instead of the real attribute.
-+ * Fix this so gnet_stats_finish_copy() adjusts the length of
-+ * the right attribute.
-+ */
-+ if (ret == 0 && d->tail->nla_type == padattr)
-+ d->tail = (struct nlattr *)((char *)d->tail +
-+ NLA_ALIGN(d->tail->nla_len));
-+ return ret;
-+ }
-
- return 0;
- }