Files
erofs-linux/tools/accounting
Yiyang Chen cc82b3dcc6 tools/accounting: handle truncated taskstats netlink messages
procacct and getdelays use a fixed receive buffer for taskstats generic
netlink messages.  A multi-threaded process exit can emit a single
PID+TGID notification large enough to exceed that buffer on newer kernels.

Switch to recvmsg() so MSG_TRUNC is detected explicitly, increase the
message buffer size, and report truncated datagrams clearly instead of
misparsing them as fatal netlink errors.

Also print the taskstats version in debug output to make version
mismatches easier to diagnose while inspecting taskstats traffic.

Link: https://lkml.kernel.org/r/520308bb4cbbaf8dc2c7296b5f60f11e12fb30a5.1774810498.git.cyyzero16@gmail.com
Signed-off-by: Yiyang Chen <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Dr. Thomas Orgis <[email protected]>
Cc: Fan Yu <[email protected]>
Cc: Wang Yaxin <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2026-04-15 02:15:02 -07:00
..