diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-01-31 05:30:04 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-01-31 05:30:20 -0500 |
commit | f1be77bb21120b5306b56d6854db1f8eb5c3678b (patch) | |
tree | aef2f02074095935a21e2d57c9b21859016d8a8c /arch/s390/mm | |
parent | f602f6d694a99a0141c066c8f0b360a0b3c16915 (diff) |
[S390] pgtable_list corruption
After page_table_free_rcu removed a page from the pgtable_list
page_table_free better not add it again. Otherwise a page_table_alloc
can reuse a page table fragment that is still in the rcu process.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/pgtable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 0c719c61972e..e1850c28cd68 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -336,7 +336,8 @@ void page_table_free(struct mm_struct *mm, unsigned long *table) | |||
336 | page->flags ^= bits; | 336 | page->flags ^= bits; |
337 | if (page->flags & FRAG_MASK) { | 337 | if (page->flags & FRAG_MASK) { |
338 | /* Page now has some free pgtable fragments. */ | 338 | /* Page now has some free pgtable fragments. */ |
339 | list_move(&page->lru, &mm->context.pgtable_list); | 339 | if (!list_empty(&page->lru)) |
340 | list_move(&page->lru, &mm->context.pgtable_list); | ||
340 | page = NULL; | 341 | page = NULL; |
341 | } else | 342 | } else |
342 | /* All fragments of the 4K page have been freed. */ | 343 | /* All fragments of the 4K page have been freed. */ |