mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-27 17:44:30 +00:00
[PATCH] fix race in pagevec_strip?
We can call try_to_release_page() with PagePrivate off and a valid page->mapping This may cause all sorts of trouble for the filesystem *_releasepage() handlers. XFS bombs out in that case. Lock the page before checking for page private. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
8ba32fde2c
commit
5b40dc780e
1 changed files with 2 additions and 1 deletions
|
@ -393,7 +393,8 @@ void pagevec_strip(struct pagevec *pvec)
|
|||
struct page *page = pvec->pages[i];
|
||||
|
||||
if (PagePrivate(page) && !TestSetPageLocked(page)) {
|
||||
try_to_release_page(page, 0);
|
||||
if (PagePrivate(page))
|
||||
try_to_release_page(page, 0);
|
||||
unlock_page(page);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue