From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mel Gorman Subject: Re: [PATCH] mm: non-atomically mark page accessed during page cache allocation where possible -fix Date: Thu, 22 May 2014 01:07:56 +0100 Message-ID: <20140522000755.GB23991@suse.de> References: <1399974350-11089-1-git-send-email-mgorman@suse.de> <1399974350-11089-19-git-send-email-mgorman@suse.de> <20140520154900.GO23991@suse.de> <20140520123453.09a76dd0c8fad40082a16289@linux-foundation.org> <20140521120916.GS23991@suse.de> <20140521151142.9d084dd64251bce4c44c214d@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Cc: Johannes Weiner , Vlastimil Babka , Jan Kara , Michal Hocko , Hugh Dickins , Peter Zijlstra , Dave Hansen , Linux Kernel , Linux-MM , Linux-FSDevel , Prabhakar Lad To: Andrew Morton Return-path: Content-Disposition: inline In-Reply-To: <20140521151142.9d084dd64251bce4c44c214d@linux-foundation.org> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Wed, May 21, 2014 at 03:11:42PM -0700, Andrew Morton wrote: > On Wed, 21 May 2014 13:09:16 +0100 Mel Gorman wrote: > > > > From: Andrew Morton > > > Subject: mm/shmem.c: don't run init_page_accessed() against an uninitialised pointer > > > > > > If shmem_getpage() returned an error then it didn't necessarily initialise > > > *pagep. So shmem_write_begin() shouldn't be playing with *pagep in this > > > situation. > > > > > > Fixes an oops when "mm: non-atomically mark page accessed during page > > > cache allocation where possible" (quite reasonably) left *pagep > > > uninitialized. > > > > > > Reported-by: Prabhakar Lad > > > Cc: Johannes Weiner > > > Cc: Vlastimil Babka > > > Cc: Jan Kara > > > Cc: Michal Hocko > > > Cc: Hugh Dickins > > > Cc: Peter Zijlstra > > > Cc: Dave Hansen > > > Cc: Mel Gorman > > > Signed-off-by: Andrew Morton > > > > Acked-by: Mel Gorman > > What to do with > http://ozlabs.org/~akpm/mmots/broken-out/mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possible-fix.patch? > > We shouldn't need it any more. otoh it's pretty harmless. otooh it > will hide bugs such as this one. > Drop it. -- Mel Gorman SUSE Labs -- 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/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754075AbaEVAIC (ORCPT ); Wed, 21 May 2014 20:08:02 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55479 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753793AbaEVAIA (ORCPT ); Wed, 21 May 2014 20:08:00 -0400 Date: Thu, 22 May 2014 01:07:56 +0100 From: Mel Gorman To: Andrew Morton Cc: Johannes Weiner , Vlastimil Babka , Jan Kara , Michal Hocko , Hugh Dickins , Peter Zijlstra , Dave Hansen , Linux Kernel , Linux-MM , Linux-FSDevel , Prabhakar Lad Subject: Re: [PATCH] mm: non-atomically mark page accessed during page cache allocation where possible -fix Message-ID: <20140522000755.GB23991@suse.de> References: <1399974350-11089-1-git-send-email-mgorman@suse.de> <1399974350-11089-19-git-send-email-mgorman@suse.de> <20140520154900.GO23991@suse.de> <20140520123453.09a76dd0c8fad40082a16289@linux-foundation.org> <20140521120916.GS23991@suse.de> <20140521151142.9d084dd64251bce4c44c214d@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20140521151142.9d084dd64251bce4c44c214d@linux-foundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 21, 2014 at 03:11:42PM -0700, Andrew Morton wrote: > On Wed, 21 May 2014 13:09:16 +0100 Mel Gorman wrote: > > > > From: Andrew Morton > > > Subject: mm/shmem.c: don't run init_page_accessed() against an uninitialised pointer > > > > > > If shmem_getpage() returned an error then it didn't necessarily initialise > > > *pagep. So shmem_write_begin() shouldn't be playing with *pagep in this > > > situation. > > > > > > Fixes an oops when "mm: non-atomically mark page accessed during page > > > cache allocation where possible" (quite reasonably) left *pagep > > > uninitialized. > > > > > > Reported-by: Prabhakar Lad > > > Cc: Johannes Weiner > > > Cc: Vlastimil Babka > > > Cc: Jan Kara > > > Cc: Michal Hocko > > > Cc: Hugh Dickins > > > Cc: Peter Zijlstra > > > Cc: Dave Hansen > > > Cc: Mel Gorman > > > Signed-off-by: Andrew Morton > > > > Acked-by: Mel Gorman > > What to do with > http://ozlabs.org/~akpm/mmots/broken-out/mm-non-atomically-mark-page-accessed-during-page-cache-allocation-where-possible-fix.patch? > > We shouldn't need it any more. otoh it's pretty harmless. otooh it > will hide bugs such as this one. > Drop it. -- Mel Gorman SUSE Labs