taskstats: fix nl parsing in accounting/getdelays.c
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 27 Apr 2016 15:53:08 +0000 (17:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Apr 2016 16:50:14 +0000 (12:50 -0400)
commit570d8e9398011a63590c281a36cdce311196608e
treec11f34750ad1786576433edcff3cfad23582c139
parent0e7dd0c9c3cde901f79f04260aa706bbfdc0c67e
taskstats: fix nl parsing in accounting/getdelays.c

The type TASKSTATS_TYPE_NULL should always be ignored.

When jumping to the next attribute, only the length of the current
attribute should be added, not the length of all nested attributes.
This last bug was not visible before commit 80df554275c2, because the
kernel didn't put more than two nested attributes.

Fixes: a3baf649ca9c ("[PATCH] per-task-delay-accounting: documentation")
Fixes: 80df554275c2 ("taskstats: use the libnl API to align nlattr on 64-bit")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/accounting/getdelays.c