[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] xen/vpci: initialize msix->next
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Fri, 14 Apr 2023 16:29:32 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S0EKJQP7OWmfg5VAzpren4WzVtEYFxSHbvtw0gR2VGo=; b=HsHMi9KuqLZdofWyOgOBaNJ4IrtavDQOf2vnIXeYzOiz+xwVf6dD2gU7m69LSXp0AGw7vJZYiR5MC61UkTLfYMBnQWggv9rIRVrGUId6WKEwN4HCkg3nP/iusRj+6oAyFE5BVJyybnH+Al4rPWyXKrHSbma9GSjf152573rDBKMypdZheeuNdwhwVtNqaoCtV7NGY6lbBdkhaDoDsyMbbQi4xFVp7OZhJPkdOE5ThbkYqi9hYUToQ+wVcpHYy0F8mmMtGDd5NaBAgW+yl3rZk8opY5278tncFotNDqaJcma6Wv+ls2/nP9og0dCVu9/npCbwW/mdZgfHVO9tuSKOLg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oXhrPKkMhMSjz5keQA/NtMClm2k2hhg1wfPIwEO1NR+jZoYaCvG7G31xOB75KTGCrasNtXdSvSHQu1yYCmthwSmlNITtf40zgF+9CczKQx/Ujb6WZCLrMOkXz2hSpki3MgUR2kUqQ8iH4JxvVJqyG9FrdhSdK5X9MJhzlXuZrDUzaRQsbxRzV9L+ZRKZVQXHycvLiELKlb/3ZPGuKaij9H7weeycZyWHIdQFSgRnN2OPok48aKuZqEI01bqXurLNpImW6lggACG5jYOzfon9ivaIQL0dEgze08TvFFPxWnwoRnJbturdTuJbKWVfnvBngGDAvaifKoTE22mFDatDDA==
- Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 14 Apr 2023 20:30:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
The list was not being initialized, which could result in a crash in
vpci_remove_device if no list items were added.
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
xen/drivers/vpci/msix.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c
index 25bde77586a4..1b98c3c10a64 100644
--- a/xen/drivers/vpci/msix.c
+++ b/xen/drivers/vpci/msix.c
@@ -678,6 +678,8 @@ static int cf_check init_msix(struct pci_dev *pdev)
if ( !msix )
return -ENOMEM;
+ INIT_LIST_HEAD(&msix->next);
+
rc = vpci_add_register(pdev->vpci, control_read, control_write,
msix_control_reg(msix_offset), 2, msix);
if ( rc )
--
2.40.0
|