* Coverity: vhost_vdpa_open(): Control flow issues
@ 2020-04-13 16:19 coverity-bot
0 siblings, 0 replies; only message in thread
From: coverity-bot @ 2020-04-13 16:19 UTC (permalink / raw)
To: Tiwei Bie
Cc: Michael S. Tsirkin, Eugenio Pérez, Jason Wang,
Gustavo A. R. Silva, linux-next
Hello!
This is an experimental automated report about issues detected by Coverity
from a scan of next-20200413 as part of the linux-next weekly 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:
Thu Mar 26 22:01:23 2020 +0800
4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Coverity reported the following:
*** CID 1461662: Control flow issues (DEADCODE)
/drivers/vhost/vdpa.c: 682 in vhost_vdpa_open()
676 struct vhost_dev *dev;
677 struct vhost_virtqueue **vqs;
678 int nvqs, i, r, opened;
679
680 v = container_of(inode->i_cdev, struct vhost_vdpa, cdev);
681 if (!v)
vvv CID 1461662: Control flow issues (DEADCODE)
vvv Execution cannot reach this statement: "return -19;".
682 return -ENODEV;
683
684 opened = atomic_cmpxchg(&v->opened, 0, 1);
685 if (opened)
686 return -EBUSY;
687
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: 1461662 ("Control flow issues")
Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Thanks for your attention!
--
Coverity-bot
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-13 16:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-13 16:19 Coverity: vhost_vdpa_open(): Control flow issues coverity-bot
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).