mm: skip rss check on MM_UNRECLAIMABLE

MM_UNRECLAIMABLE rss counter can be updated by drivers
on exit_files. But since exit_mm is called early, there
is a chance of false bad rss messages. Skip the check
for MM_UNRECLAIMABLE.

Change-Id: Id9a79db20f1ae711ec801a646d7c28d92e94f70b
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
Vinayak Menon authored and Gerrit - the friendly Code Review server committed 2019-07-16 00:46:19 -07:00
1 parent b62fce3459
commit 409c17568b
1 file changed
+7 -1
+7 -1
View File
@@ -627,7 +627,13 @@ static void check_mm(struct mm_struct *mm)
int i;
for (i = 0; i < NR_MM_COUNTERS; i++) {
long x = atomic_long_read(&mm->rss_stat.count[i]);
long x;
/* MM_UNRECLAIMABLE could be freed later in exit_files */
if (i == MM_UNRECLAIMABLE)
continue;
x = atomic_long_read(&mm->rss_stat.count[i]);
if (unlikely(x))
printk(KERN_ALERT "BUG: Bad rss-counter state "