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: <f1d3e167-a991-13cb-d263-6466110fa8c4@pensando.io>
Date:   Mon, 27 Sep 2021 09:07:03 -0700
From:   Shannon Nelson <snelson@...sando.io>
To:     Leon Romanovsky <leon@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     Leon Romanovsky <leonro@...dia.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Andrew Lunn <andrew@...n.ch>, Ariel Elior <aelior@...vell.com>,
        Bin Luo <luobin9@...wei.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Coiby Xu <coiby.xu@...il.com>,
        Derek Chickles <dchickles@...vell.com>, drivers@...sando.io,
        Felix Manlunas <fmanlunas@...vell.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Geetha sowjanya <gakula@...vell.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        GR-everest-linux-l2@...vell.com, GR-Linux-NIC-Dev@...vell.com,
        hariprasad <hkelam@...vell.com>,
        Ido Schimmel <idosch@...dia.com>,
        Intel Corporation <linuxwwan@...el.com>,
        intel-wired-lan@...ts.osuosl.org,
        Ioana Ciornei <ioana.ciornei@....com>,
        Jerin Jacob <jerinj@...vell.com>,
        Jesse Brandeburg <jesse.brandeburg@...el.com>,
        Jiri Pirko <jiri@...dia.com>,
        Jonathan Lemon <jonathan.lemon@...il.com>,
        Linu Cherian <lcherian@...vell.com>,
        linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-staging@...ts.linux.dev,
        Loic Poulain <loic.poulain@...aro.org>,
        Manish Chopra <manishc@...vell.com>,
        M Chetan Kumar <m.chetan.kumar@...el.com>,
        Michael Chan <michael.chan@...adcom.com>,
        Michael Guralnik <michaelgur@...lanox.com>,
        netdev@...r.kernel.org, oss-drivers@...igine.com,
        Richard Cochran <richardcochran@...il.com>,
        Saeed Mahameed <saeedm@...dia.com>,
        Satanand Burla <sburla@...vell.com>,
        Sergey Ryazanov <ryazanov.s.a@...il.com>,
        Simon Horman <simon.horman@...igine.com>,
        Subbaraya Sundeep <sbhatta@...vell.com>,
        Sunil Goutham <sgoutham@...vell.com>,
        Taras Chornyi <tchornyi@...vell.com>,
        Tariq Toukan <tariqt@...dia.com>,
        Tony Nguyen <anthony.l.nguyen@...el.com>,
        UNGLinuxDriver@...rochip.com, Vadym Kochan <vkochan@...vell.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next v1 14/21] ionic: Move devlink registration to be
 last devlink command

On 9/25/21 4:22 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@...dia.com>
>
> This change prevents from users to access device before devlink is
> fully configured.
>
> Signed-off-by: Leon Romanovsky <leonro@...dia.com>

Thanks for the work,

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


> ---
>   drivers/net/ethernet/pensando/ionic/ionic_devlink.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c b/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
> index 93282394d332..2267da95640b 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
> @@ -82,7 +82,6 @@ int ionic_devlink_register(struct ionic *ionic)
>   	struct devlink_port_attrs attrs = {};
>   	int err;
>   
> -	devlink_register(dl);
>   	attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
>   	devlink_port_attrs_set(&ionic->dl_port, &attrs);
>   	err = devlink_port_register(dl, &ionic->dl_port, 0);
> @@ -93,6 +92,7 @@ int ionic_devlink_register(struct ionic *ionic)
>   	}
>   
>   	devlink_port_type_eth_set(&ionic->dl_port, ionic->lif->netdev);
> +	devlink_register(dl);
>   	return 0;
>   }
>   
> @@ -100,6 +100,6 @@ void ionic_devlink_unregister(struct ionic *ionic)
>   {
>   	struct devlink *dl = priv_to_devlink(ionic);
>   
> -	devlink_port_unregister(&ionic->dl_port);
>   	devlink_unregister(dl);
> +	devlink_port_unregister(&ionic->dl_port);
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ