openwrt/target/linux/generic
Kevin Darbyshire-Bryant 3e81365141 kernel: gen_stats: Fix netlink stats dumping in the presence of padding
Backport hot off the press upstream netlink patch.  Fixes stats display
from CAKE qdisc on MIPS allowing us to bump CAKE to latest version.

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.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 3698b34a00)
2018-07-13 16:08:34 +01:00
..
backport-4.9 kernel: backport fix for missing tunnel encapsulation limit option 2018-06-21 22:10:06 +02:00
backport-4.14 kernel: bump 4.14 to 4.14.54 for 18.06 2018-07-12 13:54:24 +02:00
files kernel: rtl8366_smi: guard of_mdiobus_register() call 2018-05-11 15:07:56 +02:00
hack-4.9 kernel: bump 4.9 to 4.9.108 for 18.06 2018-06-18 06:42:18 +02:00
hack-4.14 kernel: bump 4.14 to 4.14.54 for 18.06 2018-07-12 13:54:24 +02:00
image treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
other-files kernel: move initramfs's init script out of base-files 2017-04-04 14:06:40 +02:00
pending-3.18 kernel: use upstream patches for musl 2018-01-20 22:11:33 +01:00
pending-4.4 kernel: use accepted version of bcm47xxpart fix commit 2018-05-12 23:53:44 +02:00
pending-4.9 kernel: gen_stats: Fix netlink stats dumping in the presence of padding 2018-07-13 16:08:34 +01:00
pending-4.14 kernel: gen_stats: Fix netlink stats dumping in the presence of padding 2018-07-13 16:08:34 +01:00
config-3.18 kernel: Restrict dmesg output to root. 2018-04-30 09:01:33 +02:00
config-4.4 kernel: Restrict dmesg output to root. 2018-04-30 09:01:33 +02:00
config-4.9 kernel: bump 4.9 to 4.9.102 for 18.06 2018-05-24 16:03:58 +02:00
config-4.14 kernel: enable THIN_ARCHIVES by default 2018-05-24 17:24:31 +02:00
PATCHES