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 |
---|---|---|
asymmetric_keys | ||
async_tx | ||
842.c | -rw-r--r-- | 4.2 KB |
Kconfig | -rw-r--r-- | 54.7 KB |
Makefile | -rw-r--r-- | 6.1 KB |
ablkcipher.c | -rw-r--r-- | 10.6 KB |
acompress.c | -rw-r--r-- | 4.7 KB |
adiantum.c | -rw-r--r-- | 20.8 KB |
aead.c | -rw-r--r-- | 10.2 KB |
aegis.h | -rw-r--r-- | 2.0 KB |
aegis128.c | -rw-r--r-- | 11.5 KB |
aegis128l.c | -rw-r--r-- | 14.1 KB |
aegis256.c | -rw-r--r-- | 12.2 KB |
aes_generic.c | -rw-r--r-- | 62.2 KB |
aes_ti.c | -rw-r--r-- | 12.7 KB |
af_alg.c | -rw-r--r-- | 25.7 KB |
ahash.c | -rw-r--r-- | 16.5 KB |
akcipher.c | -rw-r--r-- | 3.9 KB |
algapi.c | -rw-r--r-- | 29.4 KB |
algboss.c | -rw-r--r-- | 6.0 KB |
algif_aead.c | -rw-r--r-- | 16.0 KB |
algif_hash.c | -rw-r--r-- | 9.8 KB |
algif_rng.c | -rw-r--r-- | 5.2 KB |
algif_skcipher.c | -rw-r--r-- | 10.1 KB |
ansi_cprng.c | -rw-r--r-- | 10.9 KB |
anubis.c | -rw-r--r-- | 27.8 KB |
api.c | -rw-r--r-- | 13.9 KB |
arc4.c | -rw-r--r-- | 3.5 KB |
authenc.c | -rw-r--r-- | 14.2 KB |
authencesn.c | -rw-r--r-- | 15.3 KB |
blkcipher.c | -rw-r--r-- | 14.9 KB |
blowfish_common.c | -rw-r--r-- | 15.7 KB |
blowfish_generic.c | -rw-r--r-- | 3.4 KB |
camellia_generic.c | -rw-r--r-- | 34.9 KB |
cast5_generic.c | -rw-r--r-- | 20.8 KB |
cast6_generic.c | -rw-r--r-- | 9.4 KB |
cast_common.c | -rw-r--r-- | 13.1 KB |
cbc.c | -rw-r--r-- | 2.5 KB |
ccm.c | -rw-r--r-- | 24.9 KB |
cfb.c | -rw-r--r-- | 6.1 KB |
chacha20poly1305.c | -rw-r--r-- | 19.2 KB |
chacha_generic.c | -rw-r--r-- | 6.0 KB |
cipher.c | -rw-r--r-- | 3.3 KB |
cmac.c | -rw-r--r-- | 7.7 KB |
compress.c | -rw-r--r-- | 1.3 KB |
crc32_generic.c | -rw-r--r-- | 3.7 KB |
crc32c_generic.c | -rw-r--r-- | 4.4 KB |
crct10dif_common.c | -rw-r--r-- | 3.6 KB |
crct10dif_generic.c | -rw-r--r-- | 3.2 KB |
cryptd.c | -rw-r--r-- | 36.5 KB |
crypto_engine.c | -rw-r--r-- | 13.5 KB |
crypto_null.c | -rw-r--r-- | 5.4 KB |
crypto_user_base.c | -rw-r--r-- | 12.1 KB |
crypto_user_stat.c | -rw-r--r-- | 9.7 KB |
crypto_wq.c | -rw-r--r-- | 972 bytes |
ctr.c | -rw-r--r-- | 10.4 KB |
cts.c | -rw-r--r-- | 12.0 KB |
deflate.c | -rw-r--r-- | 7.9 KB |
des_generic.c | -rw-r--r-- | 35.8 KB |
dh.c | -rw-r--r-- | 4.9 KB |
dh_helper.c | -rw-r--r-- | 3.6 KB |
drbg.c | -rw-r--r-- | 57.2 KB |
ecb.c | -rw-r--r-- | 2.6 KB |
ecc.c | -rw-r--r-- | 27.6 KB |
ecc.h | -rw-r--r-- | 3.7 KB |
ecc_curve_defs.h | -rw-r--r-- | 2.1 KB |
ecdh.c | -rw-r--r-- | 4.1 KB |
ecdh_helper.c | -rw-r--r-- | 2.3 KB |
echainiv.c | -rw-r--r-- | 4.5 KB |
fcrypt.c | -rw-r--r-- | 18.0 KB |
fips.c | -rw-r--r-- | 1.6 KB |
gcm.c | -rw-r--r-- | 32.2 KB |
gf128mul.c | -rw-r--r-- | 12.4 KB |
ghash-generic.c | -rw-r--r-- | 3.5 KB |
hash_info.c | -rw-r--r-- | 2.1 KB |
hmac.c | -rw-r--r-- | 6.9 KB |
internal.h | -rw-r--r-- | 3.7 KB |
jitterentropy-kcapi.c | -rw-r--r-- | 6.0 KB |
jitterentropy.c | -rw-r--r-- | 23.9 KB |
keywrap.c | -rw-r--r-- | 9.5 KB |
khazad.c | -rw-r--r-- | 51.8 KB |
kpp.c | -rw-r--r-- | 2.9 KB |
lrw.c | -rw-r--r-- | 10.8 KB |
lz4.c | -rw-r--r-- | 3.9 KB |
lz4hc.c | -rw-r--r-- | 4.0 KB |
lzo-rle.c | -rw-r--r-- | 4.0 KB |
lzo.c | -rw-r--r-- | 3.9 KB |
md4.c | -rw-r--r-- | 5.9 KB |
md5.c | -rw-r--r-- | 7.4 KB |
memneq.c | -rw-r--r-- | 6.1 KB |
michael_mic.c | -rw-r--r-- | 3.6 KB |
morus1280.c | -rw-r--r-- | 14.0 KB |
morus640.c | -rw-r--r-- | 13.5 KB |
nhpoly1305.c | -rw-r--r-- | 7.7 KB |
ofb.c | -rw-r--r-- | 2.4 KB |
pcbc.c | -rw-r--r-- | 4.9 KB |
pcrypt.c | -rw-r--r-- | 13.2 KB |
poly1305_generic.c | -rw-r--r-- | 8.5 KB |
proc.c | -rw-r--r-- | 2.7 KB |
ripemd.h | -rw-r--r-- | 1013 bytes |
rmd128.c | -rw-r--r-- | 10.2 KB |
rmd160.c | -rw-r--r-- | 12.6 KB |
rmd256.c | -rw-r--r-- | 10.5 KB |
rmd320.c | -rw-r--r-- | 13.0 KB |
rng.c | -rw-r--r-- | 4.9 KB |
rsa-pkcs1pad.c | -rw-r--r-- | 17.6 KB |
rsa.c | -rw-r--r-- | 7.5 KB |
rsa_helper.c | -rw-r--r-- | 4.2 KB |
rsaprivkey.asn1 | -rw-r--r-- | 316 bytes |
rsapubkey.asn1 | -rw-r--r-- | 82 bytes |
salsa20_generic.c | -rw-r--r-- | 6.0 KB |
scatterwalk.c | -rw-r--r-- | 2.2 KB |
scompress.c | -rw-r--r-- | 7.4 KB |
seed.c | -rw-r--r-- | 17.4 KB |
seqiv.c | -rw-r--r-- | 5.2 KB |
serpent_generic.c | -rw-r--r-- | 21.4 KB |
sha1_generic.c | -rw-r--r-- | 2.6 KB |
sha256_generic.c | -rw-r--r-- | 11.0 KB |
sha3_generic.c | -rw-r--r-- | 8.2 KB |
sha512_generic.c | -rw-r--r-- | 8.0 KB |
shash.c | -rw-r--r-- | 14.9 KB |
simd.c | -rw-r--r-- | 7.3 KB |
skcipher.c | -rw-r--r-- | 31.2 KB |
sm3_generic.c | -rw-r--r-- | 4.6 KB |
sm4_generic.c | -rw-r--r-- | 6.3 KB |
streebog_generic.c | -rw-r--r-- | 59.4 KB |
tcrypt.c | -rw-r--r-- | 78.5 KB |
tcrypt.h | -rw-r--r-- | 4.4 KB |
tea.c | -rw-r--r-- | 6.6 KB |
testmgr.c | -rw-r--r-- | 98.4 KB |
testmgr.h | -rw-r--r-- | 1.2 MB |
tgr192.c | -rw-r--r-- | 30.4 KB |
twofish_common.c | -rw-r--r-- | 37.8 KB |
twofish_generic.c | -rw-r--r-- | 6.2 KB |
vmac.c | -rw-r--r-- | 18.8 KB |
wp512.c | -rw-r--r-- | 59.7 KB |
xcbc.c | -rw-r--r-- | 7.2 KB |
xor.c | -rw-r--r-- | 3.8 KB |
xts.c | -rw-r--r-- | 9.0 KB |
zstd.c | -rw-r--r-- | 5.3 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...