From: Stephen Hemminger <stephen@networkplumber.org>
To: mst@redhat.com, jasowang@redhat.com
Cc: netdev@vger.kernel.org
Subject: dead code in vhost.c
Date: Thu, 14 Feb 2019 08:03:46 -0800 [thread overview]
Message-ID: <20190214080346.352c6941@shemminger-XPS-13-9360> (raw)
Coverity found this obvious bug
________________________________________________________________________________________________________
*** CID 1442593: Control flow issues (DEADCODE)
/drivers/vhost/vhost.c: 1795 in log_used()
1789 ret = translate_desc(vq, (uintptr_t)vq->used + used_offset,
1790 len, iov, 64, VHOST_ACCESS_WO);
1791 if (ret)
1792 return ret;
1793
1794 for (i = 0; i < ret; i++) {
>>> CID 1442593: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "ret = log_write_hva(vq, (ui...".
1795 ret = log_write_hva(vq, (uintptr_t)iov[i].iov_base,
1796 iov[i].iov_len);
1797 if (ret)
1798 return ret;
1799 }
1800
next reply other threads:[~2019-02-14 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 16:03 Stephen Hemminger [this message]
2019-02-15 3:52 ` dead code in vhost.c Jason Wang
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=20190214080346.352c6941@shemminger-XPS-13-9360 \
--to=stephen@networkplumber.org \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
/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