From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754787Ab2BGKb1 (ORCPT ); Tue, 7 Feb 2012 05:31:27 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:59110 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752090Ab2BGKb0 (ORCPT ); Tue, 7 Feb 2012 05:31:26 -0500 Subject: [PATCH BUGFIX] mm: fix find_get_page() for shmem exceptional entries To: linux-mm@kvack.org, Andrew Morton , Hugh Dickins , linux-kernel@vger.kernel.org From: Konstantin Khlebnikov Date: Tue, 07 Feb 2012 14:31:21 +0400 Message-ID: <20120207103121.28345.28611.stgit@zurg> User-Agent: StGit/0.15 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It should return NULL, otherwise the caller will be very surprised. Signed-off-by: Konstantin Khlebnikov --- 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)) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx175.postini.com [74.125.245.175]) by kanga.kvack.org (Postfix) with SMTP id 5AA506B13F0 for ; Tue, 7 Feb 2012 05:31:26 -0500 (EST) Received: by bkbzs2 with SMTP id zs2so7160440bkb.14 for ; Tue, 07 Feb 2012 02:31:24 -0800 (PST) Subject: [PATCH BUGFIX] mm: fix find_get_page() for shmem exceptional entries From: Konstantin Khlebnikov Date: Tue, 07 Feb 2012 14:31:21 +0400 Message-ID: <20120207103121.28345.28611.stgit@zurg> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org, Andrew Morton , Hugh Dickins , linux-kernel@vger.kernel.org It should return NULL, otherwise the caller will be very surprised. Signed-off-by: Konstantin Khlebnikov --- 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org