]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: hv: Replace GFP_ATOMIC with GFP_KERNEL in new_pcichild_device()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Sun, 18 Mar 2018 14:53:28 +0000 (22:53 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 29 Jun 2018 15:26:38 +0000 (16:26 +0100)
commit655f9ec69d2dbe99e9a1c235cda18b3e68bc127f
tree4c3aa568b20d49a94775c3f05b411ae9172f076f
parent0d5624e606504772b89d3c3d6b1be740ef176c61
PCI: hv: Replace GFP_ATOMIC with GFP_KERNEL in new_pcichild_device()

new_pcichild_device() is not called in atomic context.

The call chain ending up at new_pcichild_device() is:
[1] new_pcichild_device() <- pci_devices_present_work()
pci_devices_present_work() is only set in INIT_WORK().

Despite never getting called from atomic context,
new_pcichild_device() calls kzalloc with GFP_ATOMIC,
which waits busily for allocation.

GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL
to avoid busy waiting.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
[lorenzo.pieralisi@arm.com: reworked commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
drivers/pci/controller/pci-hyperv.c