The patch titled Subject: tools/accounting/getdelays.c: fix netlink attribute length has been added to the -mm tree. Its filename is getdelays-fix-netlink-attribute-length.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/getdelays-fix-netlink-attribute-length.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/getdelays-fix-netlink-attribute-length.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: David Ahern <dsahern@xxxxxxxxxx> Subject: tools/accounting/getdelays.c: fix netlink attribute length A recent change to the netlink code: 6e237d099fac ("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. Link: http://lkml.kernel.org/r/20200327173111.63922-1-dsahern@xxxxxxxxxx Fixes: 9e06d3f9f6b1 ("per task delay accounting taskstats interface: documentation fix") Signed-off-by: David Ahern <dsahern@xxxxxxxxxx> Reported-by: Yafang Shao <laoar.shao@xxxxxxxxx> Tested-by: Yafang Shao <laoar.shao@xxxxxxxxx> Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> Cc: Shailabh Nagar <nagar@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/accounting/getdelays.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/accounting/getdelays.c~getdelays-fix-netlink-attribute-length +++ a/tools/accounting/getdelays.c @@ -136,7 +136,7 @@ static int send_cmd(int sd, __u16 nlmsg_ msg.g.version = 0x1; na = (struct nlattr *) GENLMSG_DATA(&msg); na->nla_type = nla_type; - na->nla_len = nla_len + 1 + NLA_HDRLEN; + na->nla_len = nla_len + NLA_HDRLEN; memcpy(NLA_DATA(na), nla_data, nla_len); msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); _ Patches currently in -mm which might be from dsahern@xxxxxxxxxx are getdelays-fix-netlink-attribute-length.patch