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: <CACGkMEuimP8dcWrBk01P-bU-L-xPH=gN4=qAY_tAqnMHqpW+rA@mail.gmail.com>
Date:   Tue, 9 Nov 2021 10:56:27 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     mst <mst@...hat.com>, Wu Zongyong <wuzongyong@...ux.alibaba.com>,
        Arnd Bergmann <arnd@...db.de>,
        virtualization <virtualization@...ts.linux-foundation.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] eni_vdpa: Simplify 'eni_vdpa_probe()'

On Mon, Nov 8, 2021 at 12:15 AM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
>
> When 'pcim_enable_device()' is used, some resources become automagically
> managed.
> There is no need to call 'pci_free_irq_vectors()' when the driver is
> removed. The same will already be done by 'pcim_release()'.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Acked-by: Jason Wang <jasowang@...hat.com>

> ---
> Leaving the 'pci_free_irq_vectors()' call is harmless.
> ---
>  drivers/vdpa/alibaba/eni_vdpa.c | 12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/drivers/vdpa/alibaba/eni_vdpa.c b/drivers/vdpa/alibaba/eni_vdpa.c
> index 12b3db6b4517..3db686436628 100644
> --- a/drivers/vdpa/alibaba/eni_vdpa.c
> +++ b/drivers/vdpa/alibaba/eni_vdpa.c
> @@ -450,11 +450,6 @@ static u16 eni_vdpa_get_num_queues(struct eni_vdpa *eni_vdpa)
>         return num;
>  }
>
> -static void eni_vdpa_free_irq_vectors(void *data)
> -{
> -       pci_free_irq_vectors(data);
> -}
> -
>  static int eni_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  {
>         struct device *dev = &pdev->dev;
> @@ -488,13 +483,6 @@ static int eni_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>         eni_vdpa->vdpa.dma_dev = &pdev->dev;
>         eni_vdpa->queues = eni_vdpa_get_num_queues(eni_vdpa);
>
> -       ret = devm_add_action_or_reset(dev, eni_vdpa_free_irq_vectors, pdev);
> -       if (ret) {
> -               ENI_ERR(pdev,
> -                       "failed for adding devres for freeing irq vectors\n");
> -               goto err;
> -       }
> -
>         eni_vdpa->vring = devm_kcalloc(&pdev->dev, eni_vdpa->queues,
>                                       sizeof(*eni_vdpa->vring),
>                                       GFP_KERNEL);
> --
> 2.30.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ