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: <b9c41357-4756-03e5-ad7c-2f80c68b11d8@pensando.io>
Date:   Mon, 26 Sep 2022 12:49:15 -0700
From:   Shannon Nelson <snelson@...sando.io>
To:     Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com, dmichail@...gible.com,
        jesse.brandeburg@...el.com, anthony.l.nguyen@...el.com,
        snelson@...sando.io, drivers@...sando.io, f.fainelli@...il.com,
        yangyingliang@...wei.com
Subject: Re: [patch net-next 3/3] ionic: change order of devlink port register
 and netdev register

On 9/26/22 4:09 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...dia.com>
> 
> Make sure that devlink port is registered first and register netdev
> after. Unregister netdev before devlnk port unregister.
> 
> Signed-off-by: Jiri Pirko <jiri@...dia.com>
> ---
>   .../net/ethernet/pensando/ionic/ionic_bus_pci.c  | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> index 0a7a757494bc..ce436e97324a 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> @@ -320,16 +320,16 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>                          dev_err(dev, "Cannot enable existing VFs: %d\n", err);
>          }
> 
> -       err = ionic_lif_register(ionic->lif);
> +       err = ionic_devlink_register(ionic);
>          if (err) {
> -               dev_err(dev, "Cannot register LIF: %d, aborting\n", err);
> +               dev_err(dev, "Cannot register devlink: %d\n", err);
>                  goto err_out_deinit_lifs;
>          }
> 
> -       err = ionic_devlink_register(ionic);
> +       err = ionic_lif_register(ionic->lif);
>          if (err) {
> -               dev_err(dev, "Cannot register devlink: %d\n", err);
> -               goto err_out_deregister_lifs;
> +               dev_err(dev, "Cannot register LIF: %d, aborting\n", err);
> +               goto err_out_deregister_devlink;
>          }
> 
>          mod_timer(&ionic->watchdog_timer,
> @@ -337,8 +337,8 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> 
>          return 0;
> 
> -err_out_deregister_lifs:
> -       ionic_lif_unregister(ionic->lif);
> +err_out_deregister_devlink:
> +       ionic_devlink_unregister(ionic);
>   err_out_deinit_lifs:
>          ionic_vf_dealloc(ionic);
>          ionic_lif_deinit(ionic->lif);
> @@ -380,8 +380,8 @@ static void ionic_remove(struct pci_dev *pdev)
>          del_timer_sync(&ionic->watchdog_timer);
> 
>          if (ionic->lif) {
> -               ionic_devlink_unregister(ionic);
>                  ionic_lif_unregister(ionic->lif);
> +               ionic_devlink_unregister(ionic);
>                  ionic_lif_deinit(ionic->lif);
>                  ionic_lif_free(ionic->lif);
>                  ionic->lif = NULL;
> --
> 2.37.1
> 

That should be alright - thanks.  -sln

Acked-by: Shannon Nelson <snelson@...sando.io>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ