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: <CAD=hENdwa-_LsQNUmd44ZCtidGOyAsdDpngAjpSZyAj78yfFUQ@mail.gmail.com>
Date:   Sat, 20 May 2023 18:51:50 +0800
From:   Zhu Yanjun <zyjzyj2000@...il.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Rain River <rain.1986.08.12@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Ayaz Abdulla <aabdulla@...dia.com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net] forcedeth: Fix an error handling path in nv_probe()

On Sat, May 20, 2023 at 4:30 PM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
>
> If an error occures after calling nv_mgmt_acquire_sema(), it should be
> undone with a corresponding nv_mgmt_release_sema() call.
>
> Add it in the error handling path of the probe as already done in the
> remove function.
>
> Fixes: cac1c52c3621 ("forcedeth: mgmt unit interface")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Thanks.
Acked-by: Zhu Yanjun <zyjzyj2000@...il.com>

Zhu Yanjun
> ---
> I don't think that the Fixes tag is really accurate, but
> nv_mgmt_release_sema() was introduced here. And cac1c52c3621 is already old
> so should be good enough.
> ---
>  drivers/net/ethernet/nvidia/forcedeth.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
> index 0605d1ee490d..7a549b834e97 100644
> --- a/drivers/net/ethernet/nvidia/forcedeth.c
> +++ b/drivers/net/ethernet/nvidia/forcedeth.c
> @@ -6138,6 +6138,7 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
>         return 0;
>
>  out_error:
> +       nv_mgmt_release_sema(dev);
>         if (phystate_orig)
>                 writel(phystate|NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl);
>  out_freering:
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ