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: <20170621135402.e4iwovvmdumarzqj@bars>
Date:   Wed, 21 Jun 2017 16:54:04 +0300
From:   Sergey Matyukevich <sergey.matyukevich.os@...ntenna.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Igor Mitsyanko <imitsyanko@...ntenna.com>,
        Avinash Patil <avinashp@...ntenna.com>,
        Sergey Matyukevich <smatyukevich@...ntenna.com>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S . Miller" <davem@...emloft.net>,
        Bindu Therthala <btherthala@...ntenna.com>,
        Kamlesh Rath <krath@...ntenna.com>,
        Sergei Maksimenko <smaksimenko@...ntenna.com>,
        Johannes Berg <johannes.berg@...el.com>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

> The return value ret is unitialized and garbage is being returned
> for the three different error conditions when setting up the PCIe
> BARs. Fix this by initializing ret to  -ENOMEM to indicate that
> the BARs failed to be setup correctly.
> 
> Detected by CoverityScan, CID#1437563 ("Unitialized scalar variable")
> 
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
> index f93b27f3a236..7fc4f0d6a9ad 100644
> --- a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
> +++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
> @@ -247,7 +247,7 @@ static void qtnf_pcie_free_shm_ipc(struct qtnf_pcie_bus_priv *priv)
> 
>  static int qtnf_pcie_init_memory(struct qtnf_pcie_bus_priv *priv)
>  {
> -       int ret;
> +       int ret = -ENOMEM;
> 
>         priv->sysctl_bar = qtnf_map_bar(priv, QTN_SYSCTL_BAR);
>         if (IS_ERR_OR_NULL(priv->sysctl_bar)) {
> --

Thanks !

Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@...ntenna.com>

By the way, could you please use the recepient list suggested by
get_maintainer.pl script from the kernel scripts directory.

Regards,
Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ