提交 8286e96d 编写于 作者: D Dexuan Cui 提交者: Bjorn Helgaas

PCI: hv: Use the correct buffer size in new_pcichild_device()

We don't really need such a big on-stack buffer.  vmbus_sendpacket() here
only uses sizeof(struct pci_child_message).
Signed-off-by: NDexuan Cui <decui@microsoft.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NJake Oshins <jakeo@microsoft.com>
上级 542ccf45
......@@ -1271,9 +1271,9 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus,
struct hv_pci_dev *hpdev;
struct pci_child_message *res_req;
struct q_res_req_compl comp_pkt;
union {
struct pci_packet init_packet;
u8 buffer[0x100];
struct {
struct pci_packet init_packet;
u8 buffer[sizeof(struct pci_child_message)];
} pkt;
unsigned long flags;
int ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册