diff options
-rw-r--r-- | mm/vmstat.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 49a8456ec079..14d0ba4fd46b 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1875,6 +1875,14 @@ int vmstat_refresh(struct ctl_table *table, int write, } } #endif + for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++) { + val = atomic_long_read(&vm_node_stat[i]); + if (val < 0) { + pr_warn("%s: %s %ld\n", + __func__, node_stat_name(i), val); + err = -EINVAL; + } + } if (err) return err; if (write) |