vmscan: protect zone rotation stats by lru lock

The zone's rotation statistics must not be accessed without the
corresponding LRU lock held. Fix an unprotected write in
shrink_active_list().

Acked-by: Rik van Riel <riel@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Johannes Weiner and committed by Linus Torvalds 2a1dc509 33b07db9

+1 -1
+1 -1
mm/vmscan.c
··· 1248 1248 list_add(&page->lru, &l_inactive); 1249 1249 } 1250 1250 1251 + spin_lock_irq(&zone->lru_lock); 1251 1252 /* 1252 1253 * Count referenced pages from currently used mappings as 1253 1254 * rotated, even though they are moved to the inactive list. ··· 1264 1263 1265 1264 pgmoved = 0; 1266 1265 lru = LRU_BASE + file * LRU_FILE; 1267 - spin_lock_irq(&zone->lru_lock); 1268 1266 while (!list_empty(&l_inactive)) { 1269 1267 page = lru_to_page(&l_inactive); 1270 1268 prefetchw_prev_lru_page(page, &l_inactive, flags);