Revision eeb0efd071d821a88da3fbd35f2d478f40d3b2ea authored by Oscar Salvador on 01 February 2019, 22:20:47 UTC, committed by Linus Torvalds on 01 February 2019, 23:46:23 UTC
This is the same sort of error we saw in commit 17e2e7d7e1b8 ("mm,
page_alloc: fix has_unmovable_pages for HugePages").

Gigantic hugepages cross several memblocks, so it can be that the page
we get in scan_movable_pages() is a page-tail belonging to a
1G-hugepage.  If that happens, page_hstate()->size_to_hstate() will
return NULL, and we will blow up in hugepage_migration_supported().

The splat is as follows:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
  #PF error: [normal kernel read fault]
  PGD 0 P4D 0
  Oops: 0000 [#1] SMP PTI
  CPU: 1 PID: 1350 Comm: bash Tainted: G            E     5.0.0-rc1-mm1-1-default+ #27
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014
  RIP: 0010:__offline_pages+0x6ae/0x900
  Call Trace:
   memory_subsys_offline+0x42/0x60
   device_offline+0x80/0xa0
   state_store+0xab/0xc0
   kernfs_fop_write+0x102/0x180
   __vfs_write+0x26/0x190
   vfs_write+0xad/0x1b0
   ksys_write+0x42/0x90
   do_syscall_64+0x5b/0x180
   entry_SYSCALL_64_after_hwframe+0x44/0xa9
  Modules linked in: af_packet(E) xt_tcpudp(E) ipt_REJECT(E) xt_conntrack(E) nf_conntrack(E) nf_defrag_ipv4(E) ip_set(E) nfnetlink(E) ebtable_nat(E) ebtable_broute(E) bridge(E) stp(E) llc(E) iptable_mangle(E) iptable_raw(E) iptable_security(E) ebtable_filter(E) ebtables(E) iptable_filter(E) ip_tables(E) x_tables(E) kvm_intel(E) kvm(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) ghash_clmulni_intel(E) bochs_drm(E) ttm(E) aesni_intel(E) drm_kms_helper(E) aes_x86_64(E) crypto_simd(E) cryptd(E) glue_helper(E) drm(E) virtio_net(E) syscopyarea(E) sysfillrect(E) net_failover(E) sysimgblt(E) pcspkr(E) failover(E) i2c_piix4(E) fb_sys_fops(E) parport_pc(E) parport(E) button(E) btrfs(E) libcrc32c(E) xor(E) zstd_decompress(E) zstd_compress(E) xxhash(E) raid6_pq(E) sd_mod(E) ata_generic(E) ata_piix(E) ahci(E) libahci(E) libata(E) crc32c_intel(E) serio_raw(E) virtio_pci(E) virtio_ring(E) virtio(E) sg(E) scsi_mod(E) autofs4(E)

[akpm@linux-foundation.org: fix brace layout, per David.  Reduce indentation]
Link: http://lkml.kernel.org/r/20190122154407.18417-1-osalvador@suse.de
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: David Hildenbrand <david@redhat.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 1b69ac6
History
File Mode Size
partitions
Kconfig -rw-r--r-- 6.5 KB
Kconfig.iosched -rw-r--r-- 1.1 KB
Makefile -rw-r--r-- 1.5 KB
badblocks.c -rw-r--r-- 14.5 KB
bfq-cgroup.c -rw-r--r-- 33.5 KB
bfq-iosched.c -rw-r--r-- 193.2 KB
bfq-iosched.h -rw-r--r-- 34.8 KB
bfq-wf2q.c -rw-r--r-- 52.3 KB
bio-integrity.c -rw-r--r-- 12.9 KB
bio.c -rw-r--r-- 52.3 KB
blk-cgroup.c -rw-r--r-- 46.6 KB
blk-core.c -rw-r--r-- 48.5 KB
blk-exec.c -rw-r--r-- 2.5 KB
blk-flush.c -rw-r--r-- 14.4 KB
blk-integrity.c -rw-r--r-- 12.0 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-iolatency.c -rw-r--r-- 27.3 KB
blk-lib.c -rw-r--r-- 10.2 KB
blk-map.c -rw-r--r-- 5.9 KB
blk-merge.c -rw-r--r-- 21.8 KB
blk-mq-cpumap.c -rw-r--r-- 1.7 KB
blk-mq-debugfs-zoned.c -rw-r--r-- 435 bytes
blk-mq-debugfs.c -rw-r--r-- 26.3 KB
blk-mq-debugfs.h -rw-r--r-- 2.7 KB
blk-mq-pci.c -rw-r--r-- 1.7 KB
blk-mq-rdma.c -rw-r--r-- 1.7 KB
blk-mq-sched.c -rw-r--r-- 13.2 KB
blk-mq-sched.h -rw-r--r-- 2.6 KB
blk-mq-sysfs.c -rw-r--r-- 8.4 KB
blk-mq-tag.c -rw-r--r-- 14.5 KB
blk-mq-tag.h -rw-r--r-- 2.3 KB
blk-mq-virtio.c -rw-r--r-- 1.7 KB
blk-mq.c -rw-r--r-- 83.9 KB
blk-mq.h -rw-r--r-- 6.8 KB
blk-pm.c -rw-r--r-- 6.6 KB
blk-pm.h -rw-r--r-- 1.4 KB
blk-rq-qos.c -rw-r--r-- 6.3 KB
blk-rq-qos.h -rw-r--r-- 4.4 KB
blk-settings.c -rw-r--r-- 27.0 KB
blk-softirq.c -rw-r--r-- 3.7 KB
blk-stat.c -rw-r--r-- 4.6 KB
blk-stat.h -rw-r--r-- 4.6 KB
blk-sysfs.c -rw-r--r-- 25.2 KB
blk-throttle.c -rw-r--r-- 67.9 KB
blk-timeout.c -rw-r--r-- 3.7 KB
blk-wbt.c -rw-r--r-- 19.9 KB
blk-wbt.h -rw-r--r-- 3.0 KB
blk-zoned.c -rw-r--r-- 11.7 KB
blk.h -rw-r--r-- 10.1 KB
bounce.c -rw-r--r-- 9.1 KB
bsg-lib.c -rw-r--r-- 9.8 KB
bsg.c -rw-r--r-- 12.5 KB
cmdline-parser.c -rw-r--r-- 4.9 KB
compat_ioctl.c -rw-r--r-- 10.9 KB
elevator.c -rw-r--r-- 16.4 KB
genhd.c -rw-r--r-- 49.5 KB
ioctl.c -rw-r--r-- 15.3 KB
ioprio.c -rw-r--r-- 5.1 KB
kyber-iosched.c -rw-r--r-- 28.3 KB
mq-deadline.c -rw-r--r-- 20.6 KB
opal_proto.h -rw-r--r-- 9.3 KB
partition-generic.c -rw-r--r-- 17.1 KB
scsi_ioctl.c -rw-r--r-- 19.1 KB
sed-opal.c -rw-r--r-- 58.8 KB
t10-pi.c -rw-r--r-- 7.9 KB

back to top