linux-stable/tools
David Ahern 7ab127c8e1 tools/accounting/getdelays.c: fix netlink attribute length
commit 4054ab64e2 upstream.

A recent change to the netlink code: 6e237d099f ("netlink: Relax attr
validation for fixed length types") logs a warning when programs send
messages with invalid attributes (e.g., wrong length for a u32).  Yafang
reported this error message for tools/accounting/getdelays.c.

send_cmd() is wrongly adding 1 to the attribute length.  As noted in
include/uapi/linux/netlink.h nla_len should be NLA_HDRLEN + payload
length, so drop the +1.

Fixes: 9e06d3f9f6 ("per task delay accounting taskstats interface: documentation fix")
Reported-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Yafang Shao <laoar.shao@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/20200327173111.63922-1-dsahern@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13 10:45:10 +02:00
..
accounting tools/accounting/getdelays.c: fix netlink attribute length 2020-04-13 10:45:10 +02:00
arch jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00
bpf tools: bpftool: fix format strings and arguments for jsonw_printf() 2020-01-27 14:51:05 +01:00
build perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz 2019-02-12 19:47:16 +01:00
cgroup
firewire
gpio tools: gpio: Correctly add make dependencies for gpio_utils 2019-12-01 09:16:09 +01:00
hv Tools: hv: kvp: eliminate 'may be used uninitialized' warning 2019-09-10 10:33:50 +01:00
iio iio: iio-utils: Fix possible incorrect mask calculation 2019-07-31 07:27:02 +02:00
include tools lib: Fix builds when glibc contains strlcpy() 2020-02-05 14:43:34 +00:00
kvm/kvm_stat tools/kvm_stat: Fix kvm_exit filter name 2020-02-11 04:34:08 -08:00
laptop
leds
lib tools lib api fs: Fix gcc9 stringop-truncation compilation error 2020-02-24 08:34:45 +01:00
memory-model tools/memory-model: Rename litmus tests to comply to norm7 2018-07-17 09:30:36 +02:00
nfsd
objtool x86/decoder: Add TEST opcode to Group3-2 2020-02-24 08:34:50 +01:00
pci tools: PCI: Fix broken pcitest compilation 2019-11-24 08:21:08 +01:00
pcmcia
perf perf map: Fix off by one in strncpy() size argument 2020-04-02 15:28:24 +02:00
power tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks 2020-04-13 10:45:01 +02:00
scripts tools: Let O= makes handle a relative path with -C option 2020-04-02 15:28:17 +02:00
spi
testing ktest: Add timeout for ssh sync testing 2020-03-18 07:14:20 +01:00
thermal/tmon
time
usb usbip: Fix unsafe unaligned pointer usage 2020-02-24 08:34:45 +01:00
virtio virtio: fix test build after uio.h change 2019-01-13 09:51:03 +01:00
vm tools/vm/page-types.c: fix "kpagecount returned fewer pages than expected" failures 2019-12-05 09:20:59 +01:00
wmi
Makefile