diff options
Diffstat (limited to 'drivers/pci/controller/pci-hyperv.c')
-rw-r--r-- | drivers/pci/controller/pci-hyperv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 6cc5036ac83c..eb202966b083 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c | |||
@@ -1073,6 +1073,7 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) | |||
1073 | struct pci_bus *pbus; | 1073 | struct pci_bus *pbus; |
1074 | struct pci_dev *pdev; | 1074 | struct pci_dev *pdev; |
1075 | struct cpumask *dest; | 1075 | struct cpumask *dest; |
1076 | unsigned long flags; | ||
1076 | struct compose_comp_ctxt comp; | 1077 | struct compose_comp_ctxt comp; |
1077 | struct tran_int_desc *int_desc; | 1078 | struct tran_int_desc *int_desc; |
1078 | struct { | 1079 | struct { |
@@ -1164,14 +1165,15 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) | |||
1164 | * the channel callback directly when channel->target_cpu is | 1165 | * the channel callback directly when channel->target_cpu is |
1165 | * the current CPU. When the higher level interrupt code | 1166 | * the current CPU. When the higher level interrupt code |
1166 | * calls us with interrupt enabled, let's add the | 1167 | * calls us with interrupt enabled, let's add the |
1167 | * local_bh_disable()/enable() to avoid race. | 1168 | * local_irq_save()/restore() to avoid race: |
1169 | * hv_pci_onchannelcallback() can also run in tasklet. | ||
1168 | */ | 1170 | */ |
1169 | local_bh_disable(); | 1171 | local_irq_save(flags); |
1170 | 1172 | ||
1171 | if (hbus->hdev->channel->target_cpu == smp_processor_id()) | 1173 | if (hbus->hdev->channel->target_cpu == smp_processor_id()) |
1172 | hv_pci_onchannelcallback(hbus); | 1174 | hv_pci_onchannelcallback(hbus); |
1173 | 1175 | ||
1174 | local_bh_enable(); | 1176 | local_irq_restore(flags); |
1175 | 1177 | ||
1176 | if (hpdev->state == hv_pcichild_ejecting) { | 1178 | if (hpdev->state == hv_pcichild_ejecting) { |
1177 | dev_err_once(&hbus->hdev->device, | 1179 | dev_err_once(&hbus->hdev->device, |
@@ -1543,7 +1545,7 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus, | |||
1543 | unsigned long flags; | 1545 | unsigned long flags; |
1544 | int ret; | 1546 | int ret; |
1545 | 1547 | ||
1546 | hpdev = kzalloc(sizeof(*hpdev), GFP_ATOMIC); | 1548 | hpdev = kzalloc(sizeof(*hpdev), GFP_KERNEL); |
1547 | if (!hpdev) | 1549 | if (!hpdev) |
1548 | return NULL; | 1550 | return NULL; |
1549 | 1551 | ||