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: <CAE_wzQ-VmW=X-HEFj4PouxUcH6jKqHR_XXhXfrQmx_-CPE_tWQ@mail.gmail.com>
Date:   Mon, 30 Jul 2018 23:18:49 -0700
From:   Dmitry Torokhov <dtor@...omium.org>
To:     toddpoynor@...il.com
Cc:     rspringer@...gle.com, jnjoseph@...gle.com, benchan@...omium.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, lkml <linux-kernel@...r.kernel.org>,
        toddpoynor@...gle.com
Subject: Re: [PATCH 01/13] staging: gasket: core: hold reference to pci_dev
 while used

On Sun, Jul 29, 2018 at 12:37 PM Todd Poynor <toddpoynor@...il.com> wrote:
>
> From: Todd Poynor <toddpoynor@...gle.com>
>
> Hold a reference on the struct pci_dev while a pointer to it is held in
> the gasket data structures.
>
> Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
> ---
>  drivers/staging/gasket/gasket_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
> index 2b484d067c38a..b832a4f529f27 100644
> --- a/drivers/staging/gasket/gasket_core.c
> +++ b/drivers/staging/gasket/gasket_core.c
> @@ -488,6 +488,7 @@ static void gasket_free_dev(struct gasket_dev *gasket_dev)
>         internal_desc->devs[gasket_dev->dev_idx] = NULL;
>         mutex_unlock(&internal_desc->mutex);
>         put_device(gasket_dev->dev);
> +       pci_dev_put(gasket_dev->pci_dev);

gasket_free_dev() is called only from driver PCI probe and remove
function. I can assure you that that pci_dev structure is not going
anywhere, there is no need to take this additional reference.

Thanks,
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ