From: Stephen Hemminger <stephen@networkplumber.org>
To: derek.chickles@caviumnetworks.com,
satananda.burla@caviumnetworks.com,
felix.manlunas@caviumnetworks.com,
raghu.vatsavayi@caviumnetworks.com
Cc: netdev@vger.kernel.org
Subject: liquidio: coverity scan errors
Date: Mon, 20 Mar 2017 08:02:21 -0700 [thread overview]
Message-ID: <20170320080221.305727fa@xeon-e3> (raw)
This showed up new Coverity scan erros
** CID 1403160: (FORWARD_NULL)
/drivers/net/ethernet/cavium/liquidio/lio_main.c: 802 in setup_glists()
/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c: 560 in setup_glists()
________________________________________________________________________________________________________
*** CID 1403160: (FORWARD_NULL)
/drivers/net/ethernet/cavium/liquidio/lio_main.c: 802 in setup_glists()
796 */
797 lio->glists_virt_base = kcalloc(num_iqs, sizeof(*lio->glists_virt_base),
798 GFP_KERNEL);
799 lio->glists_dma_base = kcalloc(num_iqs, sizeof(*lio->glists_dma_base),
800 GFP_KERNEL);
801
>>> CID 1403160: (FORWARD_NULL)
>>> Comparing "lio->glists_dma_base" to null implies that "lio->glists_dma_base" might be null.
802 if (!lio->glists_virt_base || !lio->glists_dma_base) {
803 delete_glists(lio);
804 return -ENOMEM;
805 }
806
807 for (i = 0; i < num_iqs; i++) {
/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c: 560 in setup_glists()
554 */
555 lio->glists_virt_base = kcalloc(num_iqs, sizeof(*lio->glists_virt_base),
556 GFP_KERNEL);
557 lio->glists_dma_base = kcalloc(num_iqs, sizeof(*lio->glists_dma_base),
558 GFP_KERNEL);
559
>>> CID 1403160: (FORWARD_NULL)
>>> Comparing "lio->glists_dma_base" to null implies that "lio->glists_dma_base" might be null.
560 if (!lio->glists_virt_base || !lio->glists_dma_base) {
561 delete_glists(lio);
562 return -ENOMEM;
563 }
564
565 for (i = 0; i < num_iqs; i++) {
** CID 1403161: Memory - illegal accesses (OVERRUN)
reply other threads:[~2017-03-20 15:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170320080221.305727fa@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=derek.chickles@caviumnetworks.com \
--cc=felix.manlunas@caviumnetworks.com \
--cc=netdev@vger.kernel.org \
--cc=raghu.vatsavayi@caviumnetworks.com \
--cc=satananda.burla@caviumnetworks.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;
as well as URLs for NNTP newsgroup(s).