Files
android_kernel_xiaomi_sm8450/include/linux
Pi-Hsun Shih a4046c06be include/linux/swap.h: use offsetof() instead of custom __swapoffset macro
Use offsetof() to calculate offset of a field to take advantage of
compiler built-in version when possible, and avoid UBSAN warning when
compiling with Clang:

  UBSAN: Undefined behaviour in mm/swapfile.c:3010:38
  member access within null pointer of type 'union swap_header'
  CPU: 6 PID: 1833 Comm: swapon Tainted: G S                4.19.23 #43
  Call trace:
   dump_backtrace+0x0/0x194
   show_stack+0x20/0x2c
   __dump_stack+0x20/0x28
   dump_stack+0x70/0x94
   ubsan_epilogue+0x14/0x44
   ubsan_type_mismatch_common+0xf4/0xfc
   __ubsan_handle_type_mismatch_v1+0x34/0x54
   __se_sys_swapon+0x654/0x1084
   __arm64_sys_swapon+0x1c/0x24
   el0_svc_common+0xa8/0x150
   el0_svc_compat_handler+0x2c/0x38
   el0_svc_compat+0x8/0x18

Link: http://lkml.kernel.org/r/20190312081902.223764-1-pihsun@chromium.org
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-03-14 14:36:20 -07:00
..
2018-11-14 10:56:33 -08:00
2018-12-11 09:57:47 -08:00
2018-10-16 11:13:50 +02:00
2018-11-12 10:33:49 +01:00
2019-02-28 09:16:12 +01:00
2019-02-08 22:39:01 -08:00
2019-03-06 10:46:29 -08:00
2019-02-24 08:20:17 -07:00
2019-01-24 11:11:45 -07:00
2018-11-07 13:44:59 -07:00
2018-11-07 13:44:59 -07:00
2019-02-15 08:40:12 -07:00
2019-02-01 20:55:38 +01:00
2019-02-27 17:22:50 +01:00
2019-02-01 20:55:38 +01:00
2018-11-13 21:55:24 +01:00
2019-02-28 03:28:53 -05:00
2019-02-28 08:24:23 -07:00
2018-12-19 10:42:08 +01:00
2019-03-12 10:04:02 -07:00
2019-03-05 21:07:16 -08:00
2019-02-15 16:54:38 +01:00
2019-03-12 10:04:00 -07:00
2018-10-21 10:46:33 -04:00
2018-12-07 12:59:08 -08:00
2019-03-09 19:52:47 -08:00
2018-11-07 13:42:32 -07:00
2019-02-24 08:20:17 -07:00
2018-11-19 19:03:46 -07:00
2018-12-06 13:57:03 +01:00
2018-11-30 13:29:04 +00:00
2019-01-11 20:51:24 +01:00
2019-03-07 18:32:03 -08:00
2019-01-04 13:13:48 -08:00
2019-03-12 10:04:01 -07:00
2019-01-30 20:51:47 -05:00
2018-10-17 13:56:58 -07:00
2019-02-20 07:22:17 -07:00
2019-02-20 07:22:10 -07:00
2018-12-06 15:45:46 +01:00
2019-02-08 15:02:49 -08:00
2019-03-05 21:07:19 -08:00
2018-10-21 10:46:39 -04:00
2018-10-26 16:26:35 -07:00
2019-03-03 21:47:57 -08:00
2019-02-01 02:01:45 -05:00
2018-10-08 22:53:10 +11:00
2019-03-12 10:04:03 -07:00
2018-12-03 17:11:02 -08:00
2019-01-07 16:38:26 +01:00
2019-02-25 21:20:45 +01:00
2019-02-03 11:17:31 -08:00
2019-02-07 16:38:35 +01:00
2018-10-11 09:16:44 -07:00
2019-02-07 00:13:27 +01:00
2018-12-10 10:17:45 +01:00
2019-01-11 18:05:40 -08:00
2019-02-26 12:53:55 +01:00
2018-12-22 12:15:29 +01:00