diff options
author | Arnd Bergmann <[email protected]> | 2018-08-21 21:55:49 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-08-22 10:52:47 -0700 |
commit | 91bc9aaf746ae41016bd6b61a48133e162542574 (patch) | |
tree | de38972673b7907da1d38cf1378e62bdce1641bd | |
parent | 203583990cb675aeddff6d7623f68268068c078c (diff) |
kernel/crash_core.c: print timestamp using time64_t
The get_seconds() call returns a 32-bit timestamp on some architectures,
and will overflow in the future. The newer ktime_get_real_seconds()
always returns a 64-bit timestamp that does not suffer from this problem.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Dave Young <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Petr Tesarik <[email protected]>
Cc: Marc-Andr Lureau <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | kernel/crash_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/crash_core.c b/kernel/crash_core.c index a683bfb0530f..933cb3e45b98 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -344,7 +344,7 @@ void crash_save_vmcoreinfo(void) if (vmcoreinfo_data_safecopy) vmcoreinfo_data = vmcoreinfo_data_safecopy; - vmcoreinfo_append_str("CRASHTIME=%ld\n", get_seconds()); + vmcoreinfo_append_str("CRASHTIME=%lld\n", ktime_get_real_seconds()); update_vmcoreinfo_note(); } |