[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28880e7d-c02b-0b34-d1f3-54596ec7f297@linux.ibm.com>
Date: Fri, 14 Oct 2022 13:34:17 +0200
From: Wenjia Zhang <wenjia@...ux.ibm.com>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Karsten Graul <kgraul@...ux.ibm.com>
Cc: Jan Karcher <jaka@...ux.ibm.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, linux-s390@...r.kernel.org,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] net/smc: Fix an error code in smc_lgr_create()
On 14.10.22 11:34, Dan Carpenter wrote:
> If smc_wr_alloc_lgr_mem() fails then return an error code. Don't return
> success.
>
> Fixes: 8799e310fb3f ("net/smc: add v2 support to the work request layer")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> net/smc/smc_core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
> index e6ee797640b4..c305d8dd23f8 100644
> --- a/net/smc/smc_core.c
> +++ b/net/smc/smc_core.c
> @@ -896,7 +896,8 @@ static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini)
> }
> memcpy(lgr->pnet_id, ibdev->pnetid[ibport - 1],
> SMC_MAX_PNETID_LEN);
> - if (smc_wr_alloc_lgr_mem(lgr))
> + rc = smc_wr_alloc_lgr_mem(lgr);
> + if (rc)
> goto free_wq;
> smc_llc_lgr_init(lgr, smc);
>
Good catch! Thank you for your effort!
Reviewed-by: Wenjia Zhang <wenjia@...ux.ibm.com>
Powered by blists - more mailing lists