Re: [PATCH BUGFIX] mm: fix find_get_page() for shmem exceptionalentries

From: Konstantin Khlebnikov
Date: Tue Feb 07 2012 - 05:43:12 EST

Bug was added in commit v3.0-7291-g8079b1c (mm: clarify the radix_tree exceptional cases)
So, v3.1 and v3.2 affected.

Konstantin Khlebnikov wrote:
It should return NULL, otherwise the caller will be very surprised.

Signed-off-by: Konstantin Khlebnikov<khlebnikov@xxxxxxxxxx>
mm/filemap.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index 518223b..ca98cb5 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -693,6 +693,7 @@ repeat:
* here as an exceptional entry: so return it without
* attempting to raise page count.
+ page = NULL;
goto out;
if (!page_cache_get_speculative(page))

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at