From: Ingo Molnar <mingo@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Kees Cook <keescook@chromium.org>,
Thomas Garnier <thgarnie@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Yasuaki Ishimatsu <yasu.isimatu@gmail.com>,
Jinbum Park <jinb.park7@gmail.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Yinghai Lu <yinghai@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Dave Young <dyoung@redhat.com>
Subject: Re: [PATCH v2] x86/mm: Fix incorrect for loop count calculation in sync_global_pgds
Date: Mon, 1 May 2017 21:32:14 +0200 [thread overview]
Message-ID: <20170501193214.fbozpx6dlrapsma3@gmail.com> (raw)
In-Reply-To: <1493654135-16645-1-git-send-email-bhe@redhat.com>
* Baoquan He <bhe@redhat.com> wrote:
> arch/x86/mm/init_64.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 15173d3..dfa9edb 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -96,7 +96,9 @@ void sync_global_pgds(unsigned long start, unsigned long end)
> {
> unsigned long address;
>
> - for (address = start; address <= end; address += PGDIR_SIZE) {
> + for (address = start; address <= end;
> + address = ALIGN(address + 1, PGDIR_SIZE)) {
> +
> const pgd_t *pgd_ref = pgd_offset_k(address);
> struct page *page;
This patch does not apply cleanly to tip:master.
You can avoid the col80 problems by renaming 'address' to the canonical 'addr'
name, the loop will become:
for (addr = start; addr <= end; addr = ALIGN(addr + 1, PGDIR_SIZE)) {
... which fits into 80 cols.
Thanks,
Ingo
next prev parent reply other threads:[~2017-05-01 19:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 15:55 Baoquan He
2017-05-01 16:00 ` Dan Williams
2017-05-01 19:32 ` Ingo Molnar [this message]
2017-05-01 22:08 ` Yinghai Lu
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=20170501193214.fbozpx6dlrapsma3@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dyoung@redhat.com \
--cc=hpa@zytor.com \
--cc=jinb.park7@gmail.com \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=thgarnie@google.com \
--cc=x86@kernel.org \
--cc=yasu.isimatu@gmail.com \
--cc=yinghai@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
all inboxes | Powered by JetHome®