]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: avoid crashes when node 0 is memoryless node.
authorMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Mon, 20 Jun 2016 00:33:17 +0000 (09:33 +0900)
committerJens Axboe <axboe@fb.com>
Wed, 13 Jul 2016 16:17:55 +0000 (09:17 -0700)
commit42a6e4c65babee19fafc1657d2aa886c5bc005b1
treeb67ab35ae369935c62c0b4d120af3f3e6de8dd25
parente4f34daf9b79f0e2ed617353cab8e8abe8033f50
nvme: avoid crashes when node 0 is memoryless node.

When CONFIG_NUMA is enabled and node 0 is memoryless, the system
crashes because nvme_probe() sets the device->numa_node to 0 by
set_dev_node(&pdev->dev, 0), so it tries to allocate memory from node 0.
To avoid the crash, we should change the 0 to first_memory_node.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/pci.c