lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220112003324.62755-1-yang.lee@linux.alibaba.com>
Date:   Wed, 12 Jan 2022 08:33:24 +0800
From:   Yang Li <yang.lee@...ux.alibaba.com>
To:     helgaas@...nel.org, kys@...rosoft.com
Cc:     sunilmut@...rosoft.com, haiyangz@...rosoft.com,
        sthemmin@...rosoft.com, wei.liu@...nel.org, decui@...rosoft.com,
        lorenzo.pieralisi@....com, robh@...nel.org, kw@...ux.com,
        bhelgaas@...gle.com, mikelley@...rosoft.com, maz@...nel.org,
        linux-hyperv@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH -next v2] PCI: hv: Fix an ignored error return from bitmap_find_free_region()

An error return from bitmap_find_free_region() is currently ignored 
and we instead return a completely bogus *hwirq from 
hv_pci_vec_alloc_device_irq().

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Fixes: c10bdb758ca4 ("PCI: hv: Add arm64 Hyper-V vPCI support")
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---

Change in v2:
--According to Bjorn's suggestion, the corresponding changes were made.
  https://lore.kernel.org/lkml/20220111155412.GA142851@bhelgaas/

 drivers/pci/controller/pci-hyperv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
index 26c9c8ec0989..20ea2ee330b8 100644
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@ -701,7 +701,7 @@ static int hv_pci_vec_alloc_device_irq(struct irq_domain *domain,
 				       irq_hw_number_t *hwirq)
 {
 	struct hv_pci_chip_data *chip_data = domain->host_data;
-	unsigned int index;
+	int index;
 
 	/* Find and allocate region from the SPI bitmap */
 	mutex_lock(&chip_data->map_lock);
-- 
2.20.1.7.g153144c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ