diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-11 23:58:24 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-11 23:58:24 (GMT) |
commit | 4b9eaf33d83d91430b7ca45d0ebf8241da489c92 (patch) | |
tree | 85ca3cf23a902ac53fecf8f9b6129c745af44d29 /mm/kasan | |
parent | d3396e1e4ec4aa41ef563841e8ba511ae0589003 (diff) | |
parent | 5830169f47269f78f6624bd70165eb571270da82 (diff) | |
download | linux-4b9eaf33d83d91430b7ca45d0ebf8241da489c92.tar.xz |
Merge branch 'akpm' (patches from Andrew)
Merge fixes from Andrew Morton:
"7 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm/memory_hotplug.c: initialize per_cpu_nodestats for hotadded pgdats
mm, oom: fix uninitialized ret in task_will_free_mem()
kasan: remove the unnecessary WARN_ONCE from quarantine.c
mm: memcontrol: fix memcg id ref counter on swap charge move
mm: memcontrol: fix swap counter leak on swapout from offline cgroup
proc, meminfo: use correct helpers for calculating LRU sizes in meminfo
mm/hugetlb: fix incorrect hugepages count during mem hotplug
Diffstat (limited to 'mm/kasan')
-rw-r--r-- | mm/kasan/quarantine.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c index b6728a3..baabaad 100644 --- a/mm/kasan/quarantine.c +++ b/mm/kasan/quarantine.c @@ -217,11 +217,8 @@ void quarantine_reduce(void) new_quarantine_size = (READ_ONCE(totalram_pages) << PAGE_SHIFT) / QUARANTINE_FRACTION; percpu_quarantines = QUARANTINE_PERCPU_SIZE * num_online_cpus(); - if (WARN_ONCE(new_quarantine_size < percpu_quarantines, - "Too little memory, disabling global KASAN quarantine.\n")) - new_quarantine_size = 0; - else - new_quarantine_size -= percpu_quarantines; + new_quarantine_size = (new_quarantine_size < percpu_quarantines) ? + 0 : new_quarantine_size - percpu_quarantines; WRITE_ONCE(quarantine_size, new_quarantine_size); last = global_quarantine.head; |