* [PATCH] fix missing unlock_page in mm/rmap.c
@ 2004-09-18 10:53 Nick Piggin
2004-09-18 11:41 ` William Lee Irwin III
0 siblings, 1 reply; 2+ messages in thread
From: Nick Piggin @ 2004-09-18 10:53 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds, Hugh Dickins; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 14 bytes --]
Please apply.
[-- Attachment #2: mm-rmap-missing-unlock.patch --]
[-- Type: text/x-patch, Size: 1068 bytes --]
A required unlock_page will be missed in a very rare (but possible) race
condition. Acked by Hugh, who says:
It'll be hard to hit because of the additional page_mapped test above,
with truncate unmapping ptes from mms before it advances to removing
pages from cache; but nothing to prevent it happening.
Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
linux-2.6-npiggin/mm/rmap.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff -puN mm/rmap.c~mm-rmap-missing-unlock mm/rmap.c
--- linux-2.6/mm/rmap.c~mm-rmap-missing-unlock 2004-09-18 20:46:16.000000000 +1000
+++ linux-2.6-npiggin/mm/rmap.c 2004-09-18 20:46:41.000000000 +1000
@@ -406,8 +406,9 @@ int page_referenced(struct page *page, i
referenced += page_referenced_file(page);
else if (TestSetPageLocked(page))
referenced++;
- else if (page->mapping) {
- referenced += page_referenced_file(page);
+ else {
+ if (page->mapping)
+ referenced += page_referenced_file(page);
unlock_page(page);
}
}
_
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] fix missing unlock_page in mm/rmap.c
2004-09-18 10:53 [PATCH] fix missing unlock_page in mm/rmap.c Nick Piggin
@ 2004-09-18 11:41 ` William Lee Irwin III
0 siblings, 0 replies; 2+ messages in thread
From: William Lee Irwin III @ 2004-09-18 11:41 UTC (permalink / raw)
To: Nick Piggin; +Cc: Andrew Morton, Linus Torvalds, Hugh Dickins, linux-kernel
On Sat, Sep 18, 2004 at 08:53:04PM +1000, Nick Piggin wrote:
> Please apply.
> A required unlock_page will be missed in a very rare (but possible) race
> condition. Acked by Hugh, who says:
> It'll be hard to hit because of the additional page_mapped test above,
> with truncate unmapping ptes from mms before it advances to removing
> pages from cache; but nothing to prevent it happening.
> Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
> Signed-off-by: Hugh Dickins <hugh@veritas.com>
I've hit a missing unlock_page(). I'll see if this fixed it.
-- wli
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-18 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-18 10:53 [PATCH] fix missing unlock_page in mm/rmap.c Nick Piggin
2004-09-18 11:41 ` William Lee Irwin III
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.