From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] monitor: Fix gva2gpa coverityism
Date: Fri, 10 May 2019 20:01:40 +0100 [thread overview]
Message-ID: <20190510190140.17589-1-dgilbert@redhat.com> (raw)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Coverity is complaining that while I'm checking the return
value of mon_get_cpu(), I'm not actually using the checked value,
I'm calling it again and thus it's worried I might get null;
I don't think that's actually possible since i'm under
lock anyway.
However, it's a sensible cleanup.
CID: 1401346
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index bb48997913..f93c4b5c76 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1685,7 +1685,7 @@ static void hmp_gva2gpa(Monitor *mon, const QDict *qdict)
return;
}
- gpa = cpu_get_phys_page_attrs_debug(mon_get_cpu(),
+ gpa = cpu_get_phys_page_attrs_debug(cs,
addr & TARGET_PAGE_MASK, &attrs);
if (gpa == -1) {
monitor_printf(mon, "Unmapped\n");
--
2.21.0
next reply other threads:[~2019-05-10 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 19:01 Dr. David Alan Gilbert (git) [this message]
2019-05-15 10:38 ` [Qemu-devel] [PATCH] monitor: Fix gva2gpa coverityism Stefan Hajnoczi
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=20190510190140.17589-1-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).