From: coverity-bot <keescook@chromium.org>
To: Mustafa Ismail <mustafa.ismail@intel.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
Jason Gunthorpe <jgg@nvidia.com>,
Shiraz Saleem <shiraz.saleem@intel.com>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org
Subject: Coverity: irdma_fill_device_info(): Null pointer dereferences
Date: Tue, 8 Jun 2021 10:56:05 -0700 [thread overview]
Message-ID: <202106081056.E270F59@keescook> (raw)
Hello!
This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20210608 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:
Wed Jun 2 19:55:16 2021 -0300
8498a30e1b94 ("RDMA/irdma: Register auxiliary driver and implement private channel OPs")
Coverity reported the following:
*** CID 1505164: Null pointer dereferences (NULL_RETURNS)
/drivers/infiniband/hw/irdma/main.c: 230 in irdma_fill_device_info()
224 rf->gen_ops.register_qset = irdma_lan_register_qset;
225 rf->gen_ops.unregister_qset = irdma_lan_unregister_qset;
226 rf->hw.hw_addr = pf->hw.hw_addr;
227 rf->pcidev = pf->pdev;
228 rf->msix_count = pf->num_rdma_msix;
229 rf->msix_entries = &pf->msix_entries[pf->rdma_base_vector];
vvv CID 1505164: Null pointer dereferences (NULL_RETURNS)
vvv Dereferencing "vsi", which is known to be "NULL".
230 rf->default_vsi.vsi_idx = vsi->vsi_num;
231 rf->protocol_used = IRDMA_ROCE_PROTOCOL_ONLY;
232 rf->rdma_ver = IRDMA_GEN_2;
233 rf->rsrc_profile = IRDMA_HMC_PROFILE_DEFAULT;
234 rf->rst_to = IRDMA_RST_TIMEOUT_HZ;
235 rf->gen_ops.request_reset = irdma_request_reset;
If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1505164 ("Null pointer dereferences")
Fixes: 8498a30e1b94 ("RDMA/irdma: Register auxiliary driver and implement private channel OPs")
Thanks for your attention!
--
Coverity-bot
next reply other threads:[~2021-06-08 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 17:56 coverity-bot [this message]
2021-06-15 15:58 ` Coverity: irdma_fill_device_info(): Null pointer dereferences Saleem, Shiraz
2021-06-15 16:01 ` Jason Gunthorpe
2021-06-17 14:18 ` Saleem, Shiraz
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=202106081056.E270F59@keescook \
--to=keescook@chromium.org \
--cc=gustavo@embeddedor.com \
--cc=gustavoars@kernel.org \
--cc=jgg@nvidia.com \
--cc=linux-next@vger.kernel.org \
--cc=mustafa.ismail@intel.com \
--cc=shiraz.saleem@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