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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba9806d8-2b37-a78e-9199-c7de3cc17172@linux.intel.com>
Date:   Thu, 20 Apr 2023 16:59:43 -0700
From:   "Patel, Nirmal" <nirmal.patel@...ux.intel.com>
To:     korantwork@...il.com, dlemoal@...nel.org, helgaas@...nel.org,
        kbusch@...nel.org, jonathan.derrick@...ux.dev,
        lpieralisi@...nel.org
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        Xinghui Li <korantli@...cent.com>,
        Dan Carpenter <error27@...il.com>
Subject: Re: [PATCH v2 1/2] PCI: vmd: Fix one uninitialized symbol error
 reported by Smatch

On 4/20/2023 2:43 AM, korantwork@...il.com wrote:
> From: Xinghui Li <korantli@...cent.com>
>
> There is one uninitialized symbol error reported by smatch:
> "drivers/pci/controller/vmd.c:931 vmd_enable_domain()
> error: uninitialized symbol 'ret'."
>
> Fix it by assigning ret with pci_reset_bus return.
>
> Fixes: 0a584655ef89 ("PCI: vmd: Fix secondary bus reset for Intel bridges")
> Reported-by: Dan Carpenter <error27@...il.com>
> Signed-off-by: Xinghui Li <korantli@...cent.com>
> ---
>  drivers/pci/controller/vmd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> index 990630ec57c6..1a36e9a52b93 100644
> --- a/drivers/pci/controller/vmd.c
> +++ b/drivers/pci/controller/vmd.c
> @@ -927,7 +927,8 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
>  		if (!list_empty(&child->devices)) {
>  			dev = list_first_entry(&child->devices,
>  					       struct pci_dev, bus_list);
> -			if (pci_reset_bus(dev))
> +			ret = pci_reset_bus(dev);
> +			if (ret)
>  				pci_warn(dev, "can't reset device: %d\n", ret);
>  
>  			break;

Reviewed-by: Nirmal Patel <nirmal.patel@...ux.intel.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ