]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
delayacct: fix uapi timespec64 definition
authorArnd Bergmann <arnd@arndb.de>
Mon, 2 Feb 2026 09:59:00 +0000 (10:59 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 8 Feb 2026 08:13:32 +0000 (00:13 -0800)
commit90079798f1d748e97c74e23736491543577b8aee
tree25fdc19858e292c4d4d3af0aa8c2103c3248ed14
parent2e171ab29f916455a49274a2042bac4a4b35570e
delayacct: fix uapi timespec64 definition

The custom definition of 'struct timespec64' is incompatible with both the
kernel's internal definition and the glibc type, at least on big-endian
targets that have the tv_nsec field in a different place, and the
definition clashes with any userspace that also defines a timespec64
structure.

Running the header check with -Wpadding enabled produces this output that
warns about the incorrect padding:

usr/include/linux/taskstats.h:25:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded]

Remove the hack and instead use the regular __kernel_timespec type that is
meant to be used in uapi definitions.

Link: https://lkml.kernel.org/r/20260202095906.1344100-1-arnd@kernel.org
Fixes: 29b63f6eff0e ("delayacct: add timestamp of delay max")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Fan Yu <fan.yu9@zte.com.cn>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: xu xin <xu.xin16@zte.com.cn>
Cc: Yang Yang <yang.yang29@zte.com.cn>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Jiang Kun <jiang.kun2@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/uapi/linux/taskstats.h
kernel/delayacct.c