openwrtv3/target/linux/generic
Kevin Darbyshire-Bryant 3698b34a00 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>
2018-07-03 11:40:18 +01:00
..
backport-4.9 kernel: bump 4.9 to 4.9.108 2018-06-18 07:10:19 +02:00
backport-4.14 kernel: bump 4.14 to 4.14.51 2018-06-26 08:57:21 +02:00
files kernel: rtl8366-smi: add Realtek switch management via mii-bus 2018-06-25 20:52:18 +02:00
hack-4.9 kernel: bump 4.9 to 4.9.108 2018-06-18 07:10:19 +02:00
hack-4.14 kernel: bump 4.14 to 4.14.52 2018-07-02 07:04:48 +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 Re-enable arbitrary IPv6 addresses as outer ip4-in-ip6 tunnel source address 2018-06-23 09:47:05 +02:00
pending-4.4 Re-enable arbitrary IPv6 addresses as outer ip4-in-ip6 tunnel source address 2018-06-23 09:47:05 +02:00
pending-4.9 kernel: gen_stats: Fix netlink stats dumping in the presence of padding 2018-07-03 11:40:18 +01:00
pending-4.14 kernel: gen_stats: Fix netlink stats dumping in the presence of padding 2018-07-03 11:40:18 +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.100 2018-05-18 09:10:21 +02:00
config-4.14 kernel: enable THIN_ARCHIVES by default 2018-05-22 07:55:20 +02:00
PATCHES