lkml.org 
[lkml]   [2019]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -next] mm/vmscan: fix an undefined behavior for zone id
Date


> 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.

\
 
 \ /
  Last update: 2019-11-08 22:27    [W:0.062 / U:3.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site