Revision 21ea9f5ace3a7317cc3ba1fbc749758021a83136 authored by Russ Anderson on 28 August 2013, 23:35:18 UTC, committed by Linus Torvalds on 29 August 2013, 02:26:38 UTC
"cat /sys/devices/system/memory/memory*/removable" crashed the system. The problem is that show_mem_removable() is passing a bad pfn to is_mem_section_removable(), which causes if (!node_online(page_to_nid(page))) to blow up. Why is it passing in a bad pfn? The reason is that show_mem_removable() will loop sections_per_block times. sections_per_block is 16, but mem->section_count is 8, indicating holes in this memory block. Checking that the memory section is present before checking to see if the memory section is removable fixes the problem. harp5-sys:~ # cat /sys/devices/system/memory/memory*/removable 0 1 1 1 1 1 1 1 1 1 1 1 1 1 BUG: unable to handle kernel paging request at ffffea00c3200000 IP: [<ffffffff81117ed1>] is_pageblock_removable_nolock+0x1/0x90 PGD 83ffd4067 PUD 37bdfce067 PMD 0 Oops: 0000 [#1] SMP Modules linked in: autofs4 binfmt_misc rdma_ucm rdma_cm iw_cm ib_addr ib_srp scsi_transport_srp scsi_tgt ib_ipoib ib_cm ib_uverbs ib_umad iw_cxgb3 cxgb3 mdio mlx4_en mlx4_ib ib_sa mlx4_core ib_mthca ib_mad ib_core fuse nls_iso8859_1 nls_cp437 vfat fat joydev loop hid_generic usbhid hid hwperf(O) numatools(O) dm_mod iTCO_wdt ipv6 iTCO_vendor_support igb i2c_i801 ioatdma i2c_algo_bit ehci_pci pcspkr lpc_ich i2c_core ehci_hcd ptp sg mfd_core dca rtc_cmos pps_core mperf button xhci_hcd sd_mod crc_t10dif usbcore usb_common scsi_dh_emc scsi_dh_hp_sw scsi_dh_alua scsi_dh_rdac scsi_dh gru(O) xvma(O) xfs crc32c libcrc32c thermal sata_nv processor piix mptsas mptscsih scsi_transport_sas mptbase megaraid_sas fan thermal_sys hwmon ext3 jbd ata_piix ahci libahci libata scsi_mod CPU: 4 PID: 5991 Comm: cat Tainted: G O 3.11.0-rc5-rja-uv+ #10 Hardware name: SGI UV2000/ROMLEY, BIOS SGI UV 2000/3000 series BIOS 01/15/2013 task: ffff88081f034580 ti: ffff880820022000 task.ti: ffff880820022000 RIP: 0010:[<ffffffff81117ed1>] [<ffffffff81117ed1>] is_pageblock_removable_nolock+0x1/0x90 RSP: 0018:ffff880820023df8 EFLAGS: 00010287 RAX: 0000000000040000 RBX: ffffea00c3200000 RCX: 0000000000000004 RDX: ffffea00c30b0000 RSI: 00000000001c0000 RDI: ffffea00c3200000 RBP: ffff880820023e38 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000001 R12: ffffea00c33c0000 R13: 0000160000000000 R14: 6db6db6db6db6db7 R15: 0000000000000001 FS: 00007ffff7fb2700(0000) GS:ffff88083fc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffea00c3200000 CR3: 000000081b954000 CR4: 00000000000407e0 Call Trace: show_mem_removable+0x41/0x70 dev_attr_show+0x2a/0x60 sysfs_read_file+0xf7/0x1c0 vfs_read+0xc8/0x130 SyS_read+0x5d/0xa0 system_call_fastpath+0x16/0x1b Signed-off-by: Russ Anderson <rja@sgi.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Yinghai Lu <yinghai@kernel.org> Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 368ae53
File | Mode | Size |
---|---|---|
asymmetric_keys | ||
async_tx | ||
842.c | -rw-r--r-- | 4.6 KB |
Kconfig | -rw-r--r-- | 38.7 KB |
Makefile | -rw-r--r-- | 3.6 KB |
ablkcipher.c | -rw-r--r-- | 18.2 KB |
aead.c | -rw-r--r-- | 14.0 KB |
aes_generic.c | -rw-r--r-- | 61.9 KB |
af_alg.c | -rw-r--r-- | 9.3 KB |
ahash.c | -rw-r--r-- | 12.7 KB |
algapi.c | -rw-r--r-- | 19.8 KB |
algboss.c | -rw-r--r-- | 6.4 KB |
algif_hash.c | -rw-r--r-- | 6.8 KB |
algif_skcipher.c | -rw-r--r-- | 13.2 KB |
ansi_cprng.c | -rw-r--r-- | 10.8 KB |
anubis.c | -rw-r--r-- | 27.8 KB |
api.c | -rw-r--r-- | 13.2 KB |
arc4.c | -rw-r--r-- | 3.4 KB |
authenc.c | -rw-r--r-- | 19.6 KB |
authencesn.c | -rw-r--r-- | 23.4 KB |
blkcipher.c | -rw-r--r-- | 19.4 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.5 KB |
cast_common.c | -rw-r--r-- | 13.1 KB |
cbc.c | -rw-r--r-- | 7.4 KB |
ccm.c | -rw-r--r-- | 21.4 KB |
chainiv.c | -rw-r--r-- | 8.5 KB |
cipher.c | -rw-r--r-- | 3.3 KB |
cmac.c | -rw-r--r-- | 7.5 KB |
compress.c | -rw-r--r-- | 1.3 KB |
crc32.c | -rw-r--r-- | 3.7 KB |
crc32c.c | -rw-r--r-- | 4.3 KB |
cryptd.c | -rw-r--r-- | 24.9 KB |
crypto_null.c | -rw-r--r-- | 4.4 KB |
crypto_user.c | -rw-r--r-- | 12.3 KB |
crypto_wq.c | -rw-r--r-- | 968 bytes |
ctr.c | -rw-r--r-- | 12.3 KB |
cts.c | -rw-r--r-- | 9.8 KB |
deflate.c | -rw-r--r-- | 5.4 KB |
des_generic.c | -rw-r--r-- | 35.3 KB |
ecb.c | -rw-r--r-- | 4.9 KB |
eseqiv.c | -rw-r--r-- | 6.5 KB |
fcrypt.c | -rw-r--r-- | 18.0 KB |
fips.c | -rw-r--r-- | 705 bytes |
gcm.c | -rw-r--r-- | 36.5 KB |
gf128mul.c | -rw-r--r-- | 13.2 KB |
ghash-generic.c | -rw-r--r-- | 3.7 KB |
hmac.c | -rw-r--r-- | 6.9 KB |
internal.h | -rw-r--r-- | 4.1 KB |
khazad.c | -rw-r--r-- | 51.8 KB |
krng.c | -rw-r--r-- | 1.4 KB |
lrw.c | -rw-r--r-- | 9.2 KB |
lz4.c | -rw-r--r-- | 2.5 KB |
lz4hc.c | -rw-r--r-- | 2.5 KB |
lzo.c | -rw-r--r-- | 2.4 KB |
md4.c | -rw-r--r-- | 6.2 KB |
md5.c | -rw-r--r-- | 3.9 KB |
michael_mic.c | -rw-r--r-- | 3.6 KB |
pcbc.c | -rw-r--r-- | 7.7 KB |
pcompress.c | -rw-r--r-- | 3.0 KB |
pcrypt.c | -rw-r--r-- | 14.7 KB |
proc.c | -rw-r--r-- | 3.7 KB |
ripemd.h | -rw-r--r-- | 974 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.1 KB |
rng.c | -rw-r--r-- | 3.3 KB |
salsa20_generic.c | -rw-r--r-- | 6.7 KB |
scatterwalk.c | -rw-r--r-- | 2.9 KB |
seed.c | -rw-r--r-- | 17.4 KB |
seqiv.c | -rw-r--r-- | 8.5 KB |
serpent_generic.c | -rw-r--r-- | 21.2 KB |
sha1_generic.c | -rw-r--r-- | 3.5 KB |
sha256_generic.c | -rw-r--r-- | 12.1 KB |
sha512_generic.c | -rw-r--r-- | 8.7 KB |
shash.c | -rw-r--r-- | 17.5 KB |
tcrypt.c | -rw-r--r-- | 44.7 KB |
tcrypt.h | -rw-r--r-- | 3.6 KB |
tea.c | -rw-r--r-- | 6.6 KB |
testmgr.c | -rw-r--r-- | 69.2 KB |
testmgr.h | -rw-r--r-- | 964.9 KB |
tgr192.c | -rw-r--r-- | 30.5 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.9 KB |
wp512.c | -rw-r--r-- | 59.7 KB |
xcbc.c | -rw-r--r-- | 7.2 KB |
xor.c | -rw-r--r-- | 4.0 KB |
xts.c | -rw-r--r-- | 8.7 KB |
zlib.c | -rw-r--r-- | 9.5 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...