Files
android_kernel_xiaomi_sm8450/arch/x86/kernel
Tony Luck 7ccddc4613 x86/mce/dev-mcelog: Fix -Wstringop-truncation warning about strncpy()
The kbuild test robot reported this warning:

  arch/x86/kernel/cpu/mce/dev-mcelog.c: In function 'dev_mcelog_init_device':
  arch/x86/kernel/cpu/mce/dev-mcelog.c:346:2: warning: 'strncpy' output \
    truncated before terminating nul copying 12 bytes from a string of the \
    same length [-Wstringop-truncation]

This is accurate, but I don't care that the trailing NUL character isn't
copied. The string being copied is just a magic number signature so that
crash dump tools can be sure they are decoding the right blob of memory.

Use memcpy() instead of strncpy().

Fixes: d8ecca4043 ("x86/mce/dev-mcelog: Dynamically allocate space for machine check records")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200527182808.27737-1-tony.luck@intel.com
2020-06-11 15:19:17 +02:00
..
2020-06-11 15:14:54 +02:00
2020-06-11 15:15:23 +02:00
2020-01-09 14:40:03 +01:00
2020-06-11 15:15:23 +02:00
2020-06-11 15:15:26 +02:00
2019-11-12 16:21:15 +01:00
2019-11-12 16:21:15 +01:00
2019-06-24 19:19:24 +02:00
2020-06-02 10:59:12 -07:00
2020-03-21 16:03:25 +01:00
2020-05-07 16:06:20 +02:00
2020-02-16 20:58:06 +01:00
2020-04-15 11:13:12 +02:00