From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Julien Grall <julien.grall@arm.com>,
Jan Beulich <JBeulich@suse.com>
Subject: [PATCH for-4.9] x86/mm: Placate DEADCODE Coverity warning
Date: Mon, 22 May 2017 14:12:55 +0100 [thread overview]
Message-ID: <1495458775-20946-1-git-send-email-andrew.cooper3@citrix.com> (raw)
_PAGE_GNTTAB is only used in debug builds of Xen; in release builds, it has
the value 0. Coverity complains that "l1e_get_flags(l1e) & 0" is logically
dead.
Add an extra condition into the logic to skip the flag check if _PAGE_GNTTAB
is 0.
No functional change.
Coverity-ID: 1362036
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Julien Grall <julien.grall@arm.com>
---
xen/arch/x86/mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 77b0af1..b588653 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1252,7 +1252,7 @@ void put_page_from_l1e(l1_pgentry_t l1e, struct domain *l1e_owner)
* (Note that the undestroyable active grants are not a security hole in
* Xen. All active grants can safely be cleaned up when the domain dies.)
*/
- if ( (l1e_get_flags(l1e) & _PAGE_GNTTAB) &&
+ if ( _PAGE_GNTTAB && (l1e_get_flags(l1e) & _PAGE_GNTTAB) &&
!l1e_owner->is_shutting_down && !l1e_owner->is_dying )
{
gdprintk(XENLOG_WARNING,
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-05-22 13:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 13:12 Andrew Cooper [this message]
2017-05-22 13:32 ` [PATCH for-4.9] x86/mm: Placate DEADCODE Coverity warning Jan Beulich
2017-05-31 8:52 ` Julien Grall
2017-05-31 13:23 ` Andrew Cooper
2017-06-01 11:09 ` Julien Grall
2017-06-01 11:15 ` Jan Beulich
2017-06-01 11:18 ` Julien Grall
2017-06-01 11:21 ` Jan Beulich
2017-06-01 17:25 ` Julien Grall
2017-06-01 17:44 ` Andrew Cooper
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=1495458775-20946-1-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.