diff mbox series

[SRU,Bionic] UBUNTU: SAUCE: mlxsw: Add missmerged ERR_PTR hunk

Message ID 20200709095541.12387-1-stefan.bader@canonical.com
State New
Headers show
Series [SRU,Bionic] UBUNTU: SAUCE: mlxsw: Add missmerged ERR_PTR hunk | expand

Commit Message

Stefan Bader July 9, 2020, 9:55 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1877461

While backporting this stable patch to Ubuntu 18.04/Bionic,
a hunk went missing which causes mlxsw_afa_block_create() to
return NULL still in some cases.

Fixes: 2b8b72daf074 ("mlxsw: Fix some IS_ERR() vs NULL bugs")
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kleber Sacilotto de Souza July 9, 2020, 10:27 a.m. UTC | #1
On 09.07.20 11:55, Stefan Bader wrote:
> BugLink: https://bugs.launchpad.net/bugs/1877461
> 
> While backporting this stable patch to Ubuntu 18.04/Bionic,
> a hunk went missing which causes mlxsw_afa_block_create() to
> return NULL still in some cases.
> 
> Fixes: 2b8b72daf074 ("mlxsw: Fix some IS_ERR() vs NULL bugs")
> Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

> ---
>  drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> index a29ae4cd3187..7544fbcc3283 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> @@ -319,7 +319,7 @@ struct mlxsw_afa_block *mlxsw_afa_block_create(struct mlxsw_afa *mlxsw_afa)
>  
>  	block = kzalloc(sizeof(*block), GFP_KERNEL);
>  	if (!block)
> -		return NULL;
> +		return ERR_PTR(-ENOMEM);
>  	INIT_LIST_HEAD(&block->fwd_entry_ref_list);
>  	block->afa = mlxsw_afa;
>  
>
Kamal Mostafa July 9, 2020, 3:06 p.m. UTC | #2
Thanks for fixing it, Stefan!

Acked-by: Kamal Mostafa <kamal@canonical.com>

 -Kamal

On Thu, Jul 09, 2020 at 11:55:41AM +0200, Stefan Bader wrote:
> BugLink: https://bugs.launchpad.net/bugs/1877461
> 
> While backporting this stable patch to Ubuntu 18.04/Bionic,
> a hunk went missing which causes mlxsw_afa_block_create() to
> return NULL still in some cases.
> 
> Fixes: 2b8b72daf074 ("mlxsw: Fix some IS_ERR() vs NULL bugs")
> Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> index a29ae4cd3187..7544fbcc3283 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> @@ -319,7 +319,7 @@ struct mlxsw_afa_block *mlxsw_afa_block_create(struct mlxsw_afa *mlxsw_afa)
>  
>  	block = kzalloc(sizeof(*block), GFP_KERNEL);
>  	if (!block)
> -		return NULL;
> +		return ERR_PTR(-ENOMEM);
>  	INIT_LIST_HEAD(&block->fwd_entry_ref_list);
>  	block->afa = mlxsw_afa;
>  
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Khalid Elmously July 9, 2020, 7:58 p.m. UTC | #3
On 2020-07-09 11:55:41 , Stefan Bader wrote:
> BugLink: https://bugs.launchpad.net/bugs/1877461
> 
> While backporting this stable patch to Ubuntu 18.04/Bionic,
> a hunk went missing which causes mlxsw_afa_block_create() to
> return NULL still in some cases.
> 
> Fixes: 2b8b72daf074 ("mlxsw: Fix some IS_ERR() vs NULL bugs")
> Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> index a29ae4cd3187..7544fbcc3283 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
> @@ -319,7 +319,7 @@ struct mlxsw_afa_block *mlxsw_afa_block_create(struct mlxsw_afa *mlxsw_afa)
>  
>  	block = kzalloc(sizeof(*block), GFP_KERNEL);
>  	if (!block)
> -		return NULL;
> +		return ERR_PTR(-ENOMEM);
>  	INIT_LIST_HEAD(&block->fwd_entry_ref_list);
>  	block->afa = mlxsw_afa;
>  
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
index a29ae4cd3187..7544fbcc3283 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
@@ -319,7 +319,7 @@  struct mlxsw_afa_block *mlxsw_afa_block_create(struct mlxsw_afa *mlxsw_afa)
 
 	block = kzalloc(sizeof(*block), GFP_KERNEL);
 	if (!block)
-		return NULL;
+		return ERR_PTR(-ENOMEM);
 	INIT_LIST_HEAD(&block->fwd_entry_ref_list);
 	block->afa = mlxsw_afa;