From: Norbert Manthey <nmanthey@amazon.com>
To: xen-devel@lists.xen.org
Cc: Norbert Manthey <nmanthey@amazon.com>
Subject: [MINOR FIXES 1/2] mm: fix memory cleanup
Date: Fri, 17 Feb 2017 11:47:45 +0100 [thread overview]
Message-ID: <1487328466-19180-2-git-send-email-nmanthey@amazon.com> (raw)
In-Reply-To: <1487328466-19180-1-git-send-email-nmanthey@amazon.com>
During destroying the m2p mapping, the loop variable was always incremented
by one, as the current version used a compare operator on the left hand side,
which always evaluated to true, i.e.
i += 1UL < (L2_PAGETABLE_SHIFT - 2)
The fix increments the value of the variable by the actual page size by
using the shift operator instead.
Signed-off-by: Norbert Manthey <nmanthey@amazon.com>
---
xen/arch/x86/x86_64/mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 9ead02e..52f2bd5 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -251,7 +251,7 @@ static void destroy_compat_m2p_mapping(struct mem_hotadd_info *info)
}
}
- i += 1UL < (L2_PAGETABLE_SHIFT - 2);
+ i += 1UL << (L2_PAGETABLE_SHIFT - 2);
}
return;
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-17 10:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 10:47 (no subject) Norbert Manthey
2017-02-17 10:47 ` Norbert Manthey [this message]
2017-02-17 11:29 ` [MINOR FIXES 1/2] mm: fix memory cleanup Andrew Cooper
2017-02-17 10:47 ` [MINOR FIXES 2/2] lowmemd: fix comparison in cleanup Norbert Manthey
2017-02-17 11:31 ` Andrew Cooper
2017-02-20 16:58 ` Wei Liu
2017-02-20 19:19 ` Norbert Manthey
2017-02-20 20:10 ` Wei Liu
2017-02-17 11:35 ` (no subject) 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=1487328466-19180-2-git-send-email-nmanthey@amazon.com \
--to=nmanthey@amazon.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 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).