From: "Saleem, Shiraz" <shiraz.saleem@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
"Latif, Faisal" <faisal.latif@intel.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"Devale, Sindhu" <sindhu.devale@intel.com>
Subject: RE: [bug report] i40iw: add pble resource files
Date: Wed, 14 Apr 2021 00:13:55 +0000 [thread overview]
Message-ID: <9572e3c8647d44f9b06dde9dc54a3c88@intel.com> (raw)
In-Reply-To: <YHV4CFXzqTm23AOZ@mwanda>
> Subject: [bug report] i40iw: add pble resource files
>
> Hello Faisal Latif,
>
> The patch 9715830157be: "i40iw: add pble resource files" from Jan 20, 2016, leads
> to the following static checker warning:
>
> drivers/infiniband/hw/i40iw/i40iw_pble.c:414 add_pble_pool()
> warn: '&chunk->list' not removed from list
>
> drivers/infiniband/hw/i40iw/i40iw_pble.c
> 391 }
> 392 pble_rsrc->next_fpm_addr += chunk->size;
> 393 i40iw_debug(dev, I40IW_DEBUG_PBLE, "next_fpm_addr = %llx
> chunk_size[%u] = 0x%x\n",
> 394 pble_rsrc->next_fpm_addr, chunk->size, chunk->size);
> 395 pble_rsrc->unallocated_pble -= (chunk->size >> 3);
> 396 list_add(&chunk->list, &pble_rsrc->pinfo.clist);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> "chunk" is added to the list.
>
> 397 sd_reg_val = (sd_entry_type == I40IW_SD_TYPE_PAGED) ?
> 398 sd_entry->u.pd_table.pd_page_addr.pa : sd_entry-
> >u.bp.addr.pa;
> 399 if (sd_entry->valid)
> 400 return 0;
> 401 if (dev->is_pf) {
> 402 ret_code = i40iw_hmc_sd_one(dev, hmc_info->hmc_fn_id,
> 403 sd_reg_val, idx->sd_idx,
> 404 sd_entry->entry_type, true);
> 405 if (ret_code) {
> 406 i40iw_pr_err("cqp cmd failed for sd (pbles)\n");
> 407 goto error;
> ^^^^^^^^^^ We hit an error
>
> 408 }
> 409 }
> 410
> 411 sd_entry->valid = true;
> 412 return 0;
> 413 error:
> 414 kfree(chunk);
> ^^^^^^^^^^^^
> "chunk" is freed but it's still on the list
>
Hi Dan - Thanks for the report and it looks legit. We will send a fix for it.
Shiraz
prev parent reply other threads:[~2021-04-14 0:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 10:52 [bug report] i40iw: add pble resource files Dan Carpenter
2021-04-14 0:13 ` Saleem, Shiraz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9572e3c8647d44f9b06dde9dc54a3c88@intel.com \
--to=shiraz.saleem@intel.com \
--cc=dan.carpenter@oracle.com \
--cc=faisal.latif@intel.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sindhu.devale@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox