Re: [PATCH -next] mm/vmscan: fix an undefined behavior for zone id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Qian Cai writes:
On Nov 8, 2019, at 3:44 PM, Qian Cai <cai@xxxxxx> 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.

Ah, I just saw this in my local checkout and thought it was from my changes, until I saw it's also on clean mmots checkout. Thanks for the fixup!

Acked-by: Chris Down <chris@xxxxxxxxxxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux