From: Michal Hocko <mhocko@kernel.org>
To: Qian Cai <cai@lca.pw>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, guro@fb.com,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] mm/vmscan: fix an undefined behavior for zone id
Date: Mon, 11 Nov 2019 11:12:48 +0100 [thread overview]
Message-ID: <20191111101248.GF1396@dhcp22.suse.cz> (raw)
In-Reply-To: <64E60F6F-7582-427B-8DD5-EF97B1656F5A@lca.pw>
On Fri 08-11-19 16:26:52, Qian Cai wrote:
>
>
> > On Nov 8, 2019, at 3:44 PM, Qian Cai <cai@lca.pw> wrote:
> >
> > - for (zid = 0; zid <= zone_idx; zid++) {
> > + for (zid = 0; zid < zone_idx; zid++) {
> > struct zone *zone =
>
> Oops, I think here needs to be,
>
> for (zid = 0; zid <= zone_idx && zid < MAX_NR_ZONES; zid++) {
>
> to deal with this MAX_NR_ZONES special case.
Yep this looks correct.
Thanks!
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2019-11-11 10:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 20:44 [PATCH -next] mm/vmscan: fix an undefined behavior for zone id Qian Cai
2019-11-08 21:26 ` Qian Cai
2019-11-11 10:12 ` Michal Hocko [this message]
2019-11-11 13:05 ` Chris Down
2019-11-11 13:14 ` Chris Down
2019-11-11 13:28 ` Michal Hocko
2019-11-12 14:59 ` Johannes Weiner
2019-11-12 15:27 ` Michal Hocko
2019-11-12 16:16 ` Johannes Weiner
2019-11-12 16:24 ` Qian Cai
2019-11-12 16:31 ` Michal Hocko
2019-11-12 18:20 ` Johannes Weiner
2019-11-12 18:30 ` Michal Hocko
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=20191111101248.GF1396@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cai@lca.pw \
--cc=cgroups@vger.kernel.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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).