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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8+B0UctSryV4VPk@unreal>
Date:   Tue, 24 Jan 2023 08:59:29 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Tony Nguyen <anthony.l.nguyen@...el.com>
Cc:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com,
        Paul M Stillwell Jr <paul.m.stillwell.jr@...el.com>,
        netdev@...r.kernel.org, jiri@...dia.com,
        Gurucharan G <gurucharanx.g@...el.com>
Subject: Re: [PATCH net 1/1] ice: move devlink port creation/deletion

On Mon, Jan 23, 2023 at 04:57:14PM -0800, Tony Nguyen wrote:
> From: Paul M Stillwell Jr <paul.m.stillwell.jr@...el.com>
> 
> Commit a286ba738714 ("ice: reorder PF/representor devlink
> port register/unregister flows") moved the code to create
> and destroy the devlink PF port. This was fine, but created
> a corner case issue in the case of ice_register_netdev()
> failing. In that case, the driver would end up calling
> ice_devlink_destroy_pf_port() twice.
> 
> Additionally, it makes no sense to tie creation of the devlink
> PF port to the creation of the netdev so separate out the
> code to create/destroy the devlink PF port from the netdev
> code. This makes it a cleaner interface.
> 
> Fixes: a286ba738714 ("ice: reorder PF/representor devlink port register/unregister flows")
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@...el.com>
> Tested-by: Gurucharan G <gurucharanx.g@...el.com> (A Contingent worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> ---
> There will be a merge conflict when rebasing with next-next.
> 
> Resolution:
> static void ice_remove(struct pci_dev *
>   		ice_remove_arfs(pf);
>   	ice_setup_mc_magic_wake(pf);
>   	ice_vsi_release_all(pf);
>  -	mutex_destroy(&(&pf->hw)->fdir_fltr_lock);
>  +	mutex_destroy(&hw->fdir_fltr_lock);
> + 	ice_devlink_destroy_pf_port(pf);
>   	ice_set_wake(pf);
>   	ice_free_irq_msix_misc(pf);
>   	ice_for_each_vsi(pf, i) {
> 
>  drivers/net/ethernet/intel/ice/ice_lib.c  |  3 ---
>  drivers/net/ethernet/intel/ice/ice_main.c | 25 +++++++++++++++--------
>  2 files changed, 17 insertions(+), 11 deletions(-)

If you seek cleaner interface, you will be better separate
ice_vsi_release_all() to many small building blocks, so unwind will be
symmetrical to probe.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ