Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kasan: avoid overflowing quarantine size on low memory systems
If the total amount of memory assigned to quarantine is less than the amount of memory assigned to per-cpu quarantines, |new_quarantine_size| may overflow. Instead, set it to zero. [[email protected]: cleanup: use WARN_ONCE return value] Link: http://lkml.kernel.org/r/[email protected] Fixes: 55834c5 ("mm: kasan: initial memory quarantine implementation") Signed-off-by: Alexander Potapenko <[email protected]> Reported-by: Dmitry Vyukov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information