Skip to content

Commit

Permalink
PCI: hv: Handle vmbus_sendpacket() failure in hv_compose_msi_msg()
Browse files Browse the repository at this point in the history
Handle vmbus_sendpacket() failure in hv_compose_msi_msg().

I happened to find this when reading the code.  I didn't get a real issue
however.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: KY Srinivasan <kys@microsoft.com>
CC: Jake Oshins <jakeo@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
  • Loading branch information
Dexuan Cui authored and Bjorn Helgaas committed Sep 6, 2016
1 parent 617ceb6 commit 665e224
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/pci/host/pci-hyperv.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,10 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
sizeof(*int_pkt), (unsigned long)&ctxt.pkt,
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (!ret)
wait_for_completion(&comp.comp_pkt.host_event);
if (ret)
goto free_int_desc;

wait_for_completion(&comp.comp_pkt.host_event);

if (comp.comp_pkt.completion_status < 0) {
dev_err(&hbus->hdev->device,
Expand Down

0 comments on commit 665e224

Please sign in to comment.