Skip to content

taskstats: fix TGID exit version and tool message truncation

Yiyang Chen lkml stable 1 version Applied

Status from this message: [merged mm-nonmm-stable] tools-accounting-handle-truncated-taskstats-netlink-messages.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2taskstats: set version in TGID exit notificationskernel/taskstats.c+1 -02 repliesApplied
2/2tools/accounting: handle truncated taskstats netlink messagestools/accounting/getdelays.c tools/accounting/procacct.c+73 -80 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] taskstats: fix TGID exit version and tool message truncation

This series contains two independent fixes around taskstats.

The first patch fixes a long-standing taskstats bug where TGID exit notifications can carry version == 0 because the cached signal->stats aggregate is copied into the outgoing payload without restoring the taskstats version field.

The second patch hardens the accounting sample tools against truncated taskstats netlink messages by switching to recvmsg(), checking MSG_TRUNC explicitly, and increasing the receive buffer size.

Yiyang Chen (2):
taskstats: set version in TGID exit notifications tools/accounting: handle truncated taskstats netlink messages

 kernel/taskstats.c           |  1 +
 tools/accounting/getdelays.c | 41 ++++++++++++++++++++++++++++++++----
 tools/accounting/procacct.c  | 40 +++++++++++++++++++++++++++++++----
 3 files changed, 74 insertions(+), 8 deletions(-)

base-commit: f242ac4a09443c6e2e0ec03d7e2a21b00cbb3907

Signature · 1 line
2.43.0