================================================================== BUG: KMSAN: uninit-value in mpol_rebind_policy mm/mempolicy.c:353 [inline] BUG: KMSAN: uninit-value in mpol_rebind_task+0x1b2/0x250 mm/mempolicy.c:369 CPU: 1 PID: 14360 Comm: syz-executor1 Not tainted 5.0.0-rc1+ #7 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x173/0x1d0 lib/dump_stack.c:113 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:600 __msan_warning+0x82/0xf0 mm/kmsan/kmsan_instr.c:313 mpol_rebind_policy mm/mempolicy.c:353 [inline] mpol_rebind_task+0x1b2/0x250 mm/mempolicy.c:369 cpuset_change_task_nodemask kernel/cgroup/cpuset.c:1591 [inline] update_tasks_nodemask+0x484/0xca0 kernel/cgroup/cpuset.c:1635 update_nodemasks_hier kernel/cgroup/cpuset.c:1708 [inline] update_nodemask kernel/cgroup/cpuset.c:1776 [inline] cpuset_write_resmask+0x1453/0x2880 kernel/cgroup/cpuset.c:2339 cgroup_file_write+0x44a/0x8e0 kernel/cgroup/cgroup.c:3507 kernfs_fop_write+0x569/0x840 fs/kernfs/file.c:316 __vfs_write+0x1e2/0xc20 fs/read_write.c:485 vfs_write+0x481/0x920 fs/read_write.c:549 ksys_pwrite64 fs/read_write.c:652 [inline] __do_sys_pwrite64 fs/read_write.c:662 [inline] __se_sys_pwrite64+0x285/0x330 fs/read_write.c:659 __x64_sys_pwrite64+0x56/0x70 fs/read_write.c:659 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x458099 Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9820457c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000458099 RDX: 0000000000000002 RSI: 00000000200001c0 RDI: 0000000000000004 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f98204586d4 R13: 00000000004c4bf0 R14: 00000000004d8368 R15: 00000000ffffffff Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:205 [inline] kmsan_save_stack mm/kmsan/kmsan.c:220 [inline] kmsan_internal_chain_origin+0x134/0x230 mm/kmsan/kmsan.c:426 kmsan_memcpy_memmove_metadata+0xcf2/0xf10 mm/kmsan/kmsan.c:304 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:324 __msan_memcpy+0x58/0x70 mm/kmsan/kmsan_instr.c:139 __mpol_dup+0x178/0x470 mm/mempolicy.c:2146 mpol_dup include/linux/mempolicy.h:91 [inline] copy_process+0x2083/0xafe0 kernel/fork.c:1844 _do_fork+0x384/0x1050 kernel/fork.c:2219 __do_sys_clone kernel/fork.c:2326 [inline] __se_sys_clone+0xf6/0x110 kernel/fork.c:2320 __x64_sys_clone+0x62/0x80 kernel/fork.c:2320 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:205 [inline] kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:159 kmsan_kmalloc+0xa6/0x130 mm/kmsan/kmsan_hooks.c:176 kmem_cache_alloc+0x585/0xb60 mm/slub.c:2772 mpol_new mm/mempolicy.c:276 [inline] do_set_mempolicy+0x353/0xad0 mm/mempolicy.c:748 kernel_set_mempolicy mm/mempolicy.c:1374 [inline] __do_sys_set_mempolicy mm/mempolicy.c:1380 [inline] __se_sys_set_mempolicy+0x216/0x2a0 mm/mempolicy.c:1377 __x64_sys_set_mempolicy+0x4a/0x70 mm/mempolicy.c:1377 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 ==================================================================