summaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller
diff options
context:
space:
mode:
authorJia-Ju Bai2018-03-18 15:53:28 +0100
committerLorenzo Pieralisi2018-06-29 17:26:38 +0200
commit7403bd14d7b545ef89c3443c09ccdb3c631a9a27 (patch)
tree4c3aa568b20d49a94775c3f05b411ae9172f076f /drivers/pci/controller
parentLinux 4.18-rc1 (diff)
downloadkernel-qcow2-linux-7403bd14d7b545ef89c3443c09ccdb3c631a9a27.tar.gz
kernel-qcow2-linux-7403bd14d7b545ef89c3443c09ccdb3c631a9a27.tar.xz
kernel-qcow2-linux-7403bd14d7b545ef89c3443c09ccdb3c631a9a27.zip
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>
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r--drivers/pci/controller/pci-hyperv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
index 6cc5036ac83c..ba1d4b556064 100644
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@ -1543,7 +1543,7 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
unsigned long flags;
int ret;
- hpdev = kzalloc(sizeof(*hpdev), GFP_ATOMIC);
+ hpdev = kzalloc(sizeof(*hpdev), GFP_KERNEL);
if (!hpdev)
return NULL;