From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933085AbdKBNy0 (ORCPT ); Thu, 2 Nov 2017 09:54:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:57509 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932892AbdKBNyZ (ORCPT ); Thu, 2 Nov 2017 09:54:25 -0400 Date: Thu, 2 Nov 2017 14:54:23 +0100 From: Michal Hocko To: Pavel Tatashin Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, akpm@linux-foundation.org, mgorman@techsingularity.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/1] mm: buddy page accessed before initialized Message-ID: <20171102135423.voxnzk2qkvfgu5l3@dhcp22.suse.cz> References: <20171031155002.21691-1-pasha.tatashin@oracle.com> <20171031155002.21691-2-pasha.tatashin@oracle.com> <20171102133235.2vfmmut6w4of2y3j@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 02-11-17 09:39:58, Pavel Tatashin wrote: [...] > Hi Michal, > > Previously as before my project? That is because memory for all struct pages > was always zeroed in memblock, and in __free_one_page() page_is_buddy() was > always returning false, thus we never tried to incorrectly remove it from > the list: > > 837 list_del(&buddy->lru); > > Now, that memory is not zeroed, page_is_buddy() can return true after kexec > when memory is dirty (unfortunately memset(1) with CONFIG_VM_DEBUG does not > catch this case). And proceed further to incorrectly remove buddy from the > list. OK, I thought this was a regression from one of the recent patches. So the problem is not new. Why don't we see the same problem during the standard boot? > This is why we must initialize the computed buddy page beforehand. Ble, this is really ugly. I will think about it more. -- Michal Hocko SUSE Labs