Revision c4efe484b5f0d768e23c9731082fec827723e738 authored by Qian Cai on 29 March 2019, 03:44:16 UTC, committed by Linus Torvalds on 29 March 2019, 17:01:37 UTC
When start_isolate_page_range() returned -EBUSY in __offline_pages(), it calls memory_notify(MEM_CANCEL_OFFLINE, &arg) with an uninitialized "arg". As the result, it triggers warnings below. Also, it is only necessary to notify MEM_CANCEL_OFFLINE after MEM_GOING_OFFLINE. page:ffffea0001200000 count:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x3fffe000001000(reserved) raw: 003fffe000001000 ffffea0001200008 ffffea0001200008 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: unmovable page WARNING: CPU: 25 PID: 1665 at mm/kasan/common.c:665 kasan_mem_notifier+0x34/0x23b CPU: 25 PID: 1665 Comm: bash Tainted: G W 5.0.0+ #94 Hardware name: HP ProLiant DL180 Gen9/ProLiant DL180 Gen9, BIOS U20 10/25/2017 RIP: 0010:kasan_mem_notifier+0x34/0x23b RSP: 0018:ffff8883ec737890 EFLAGS: 00010206 RAX: 0000000000000246 RBX: ff10f0f4435f1000 RCX: f887a7a21af88000 RDX: dffffc0000000000 RSI: 0000000000000020 RDI: ffff8881f221af88 RBP: ffff8883ec737898 R08: ffff888000000000 R09: ffffffffb0bddcd0 R10: ffffed103e857088 R11: ffff8881f42b8443 R12: dffffc0000000000 R13: 00000000fffffff9 R14: dffffc0000000000 R15: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000560fbd31d730 CR3: 00000004049c6003 CR4: 00000000001606a0 Call Trace: notifier_call_chain+0xbf/0x130 __blocking_notifier_call_chain+0x76/0xc0 blocking_notifier_call_chain+0x16/0x20 memory_notify+0x1b/0x20 __offline_pages+0x3e2/0x1210 offline_pages+0x11/0x20 memory_block_action+0x144/0x300 memory_subsys_offline+0xe5/0x170 device_offline+0x13f/0x1e0 state_store+0xeb/0x110 dev_attr_store+0x3f/0x70 sysfs_kf_write+0x104/0x150 kernfs_fop_write+0x25c/0x410 __vfs_write+0x66/0x120 vfs_write+0x15a/0x4f0 ksys_write+0xd2/0x1b0 __x64_sys_write+0x73/0xb0 do_syscall_64+0xeb/0xb78 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f14f75cc3b8 RSP: 002b:00007ffe84d01d68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007f14f75cc3b8 RDX: 0000000000000008 RSI: 0000563f8e433d70 RDI: 0000000000000001 RBP: 0000563f8e433d70 R08: 000000000000000a R09: 00007ffe84d018f0 R10: 000000000000000a R11: 0000000000000246 R12: 00007f14f789e780 R13: 0000000000000008 R14: 00007f14f7899740 R15: 0000000000000008 Link: http://lkml.kernel.org/r/20190320204255.53571-1-cai@lca.pw Fixes: 7960509329c2 ("mm, memory_hotplug: print reason for the offlining failure") Reviewed-by: Oscar Salvador <osalvador@suse.de> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Qian Cai <cai@lca.pw> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: <stable@vger.kernel.org> [5.0.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fcfc2aa
File | Mode | Size |
---|---|---|
bpf | ||
cgroup | ||
configs | ||
debug | ||
dma | ||
events | ||
gcov | ||
irq | ||
livepatch | ||
locking | ||
power | ||
printk | ||
rcu | ||
sched | ||
time | ||
trace | ||
.gitignore | -rw-r--r-- | 40 bytes |
Kconfig.freezer | -rw-r--r-- | 52 bytes |
Kconfig.hz | -rw-r--r-- | 1.6 KB |
Kconfig.locks | -rw-r--r-- | 4.8 KB |
Kconfig.preempt | -rw-r--r-- | 2.2 KB |
Makefile | -rw-r--r-- | 3.8 KB |
acct.c | -rw-r--r-- | 15.4 KB |
async.c | -rw-r--r-- | 10.4 KB |
audit.c | -rw-r--r-- | 61.3 KB |
audit.h | -rw-r--r-- | 11.0 KB |
audit_fsnotify.c | -rw-r--r-- | 6.0 KB |
audit_tree.c | -rw-r--r-- | 25.7 KB |
audit_watch.c | -rw-r--r-- | 14.7 KB |
auditfilter.c | -rw-r--r-- | 34.3 KB |
auditsc.c | -rw-r--r-- | 68.8 KB |
backtracetest.c | -rw-r--r-- | 2.1 KB |
bounds.c | -rw-r--r-- | 751 bytes |
capability.c | -rw-r--r-- | 14.6 KB |
compat.c | -rw-r--r-- | 10.1 KB |
configs.c | -rw-r--r-- | 2.7 KB |
context_tracking.c | -rw-r--r-- | 6.3 KB |
cpu.c | -rw-r--r-- | 54.5 KB |
cpu_pm.c | -rw-r--r-- | 6.0 KB |
crash_core.c | -rw-r--r-- | 11.5 KB |
crash_dump.c | -rw-r--r-- | 1.3 KB |
cred.c | -rw-r--r-- | 22.4 KB |
delayacct.c | -rw-r--r-- | 5.1 KB |
dma.c | -rw-r--r-- | 3.3 KB |
elfcore.c | -rw-r--r-- | 432 bytes |
exec_domain.c | -rw-r--r-- | 1.1 KB |
exit.c | -rw-r--r-- | 44.4 KB |
extable.c | -rw-r--r-- | 4.8 KB |
fail_function.c | -rw-r--r-- | 7.1 KB |
fork.c | -rw-r--r-- | 63.4 KB |
freezer.c | -rw-r--r-- | 4.5 KB |
futex.c | -rw-r--r-- | 104.1 KB |
groups.c | -rw-r--r-- | 4.9 KB |
hung_task.c | -rw-r--r-- | 7.3 KB |
iomem.c | -rw-r--r-- | 4.7 KB |
irq_work.c | -rw-r--r-- | 4.4 KB |
jump_label.c | -rw-r--r-- | 19.7 KB |
kallsyms.c | -rw-r--r-- | 17.6 KB |
kcmp.c | -rw-r--r-- | 5.7 KB |
kcov.c | -rw-r--r-- | 11.0 KB |
kexec.c | -rw-r--r-- | 7.8 KB |
kexec_core.c | -rw-r--r-- | 31.1 KB |
kexec_file.c | -rw-r--r-- | 31.9 KB |
kexec_internal.h | -rw-r--r-- | 924 bytes |
kmod.c | -rw-r--r-- | 5.0 KB |
kprobes.c | -rw-r--r-- | 63.6 KB |
ksysfs.c | -rw-r--r-- | 6.3 KB |
kthread.c | -rw-r--r-- | 34.0 KB |
latencytop.c | -rw-r--r-- | 7.9 KB |
memremap.c | -rw-r--r-- | 9.9 KB |
module-internal.h | -rw-r--r-- | 959 bytes |
module.c | -rw-r--r-- | 112.9 KB |
module_signing.c | -rw-r--r-- | 2.3 KB |
notifier.c | -rw-r--r-- | 16.3 KB |
nsproxy.c | -rw-r--r-- | 6.5 KB |
padata.c | -rw-r--r-- | 27.1 KB |
panic.c | -rw-r--r-- | 17.4 KB |
params.c | -rw-r--r-- | 23.2 KB |
pid.c | -rw-r--r-- | 11.2 KB |
pid_namespace.c | -rw-r--r-- | 11.4 KB |
profile.c | -rw-r--r-- | 14.8 KB |
ptrace.c | -rw-r--r-- | 32.5 KB |
range.c | -rw-r--r-- | 3.0 KB |
reboot.c | -rw-r--r-- | 13.9 KB |
relay.c | -rw-r--r-- | 32.1 KB |
resource.c | -rw-r--r-- | 40.9 KB |
rseq.c | -rw-r--r-- | 9.9 KB |
seccomp.c | -rw-r--r-- | 45.1 KB |
signal.c | -rw-r--r-- | 113.7 KB |
smp.c | -rw-r--r-- | 21.6 KB |
smpboot.c | -rw-r--r-- | 11.7 KB |
smpboot.h | -rw-r--r-- | 640 bytes |
softirq.c | -rw-r--r-- | 18.6 KB |
stackleak.c | -rw-r--r-- | 3.9 KB |
stacktrace.c | -rw-r--r-- | 1.8 KB |
stop_machine.c | -rw-r--r-- | 17.8 KB |
sys.c | -rw-r--r-- | 62.1 KB |
sys_ni.c | -rw-r--r-- | 9.3 KB |
sysctl.c | -rw-r--r-- | 78.4 KB |
sysctl_binary.c | -rw-r--r-- | 50.2 KB |
task_work.c | -rw-r--r-- | 3.1 KB |
taskstats.c | -rw-r--r-- | 15.4 KB |
test_kprobes.c | -rw-r--r-- | 6.4 KB |
torture.c | -rw-r--r-- | 20.8 KB |
tracepoint.c | -rw-r--r-- | 15.6 KB |
tsacct.c | -rw-r--r-- | 5.1 KB |
ucount.c | -rw-r--r-- | 5.7 KB |
uid16.c | -rw-r--r-- | 5.1 KB |
uid16.h | -rw-r--r-- | 442 bytes |
umh.c | -rw-r--r-- | 19.0 KB |
up.c | -rw-r--r-- | 2.3 KB |
user-return-notifier.c | -rw-r--r-- | 1.3 KB |
user.c | -rw-r--r-- | 5.6 KB |
user_namespace.c | -rw-r--r-- | 33.4 KB |
utsname.c | -rw-r--r-- | 4.0 KB |
utsname_sysctl.c | -rw-r--r-- | 3.4 KB |
watchdog.c | -rw-r--r-- | 21.3 KB |
watchdog_hld.c | -rw-r--r-- | 7.7 KB |
workqueue.c | -rw-r--r-- | 164.0 KB |
workqueue_internal.h | -rw-r--r-- | 2.4 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...