linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Qian Cai <cai@lca.pw>, Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	gor@linux.ibm.com, borntraeger@de.ibm.com,
	linux-s390@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_alloc: fix a crash in free_pages_prepare()
Date: Mon, 30 Sep 2019 09:44:37 +0200	[thread overview]
Message-ID: <20190930074437.GB5604@osiris> (raw)
In-Reply-To: <1569618908.5576.240.camel@lca.pw>

On Fri, Sep 27, 2019 at 05:15:08PM -0400, Qian Cai wrote:
> On Fri, 2019-09-27 at 13:48 -0700, Andrew Morton wrote:
> > On Fri, 27 Sep 2019 15:47:03 -0400 Qian Cai <cai@lca.pw> wrote:
> > > --- a/mm/page_alloc.c
> > > +++ b/mm/page_alloc.c
> > > @@ -1175,11 +1175,11 @@ static __always_inline bool free_pages_prepare(struct page *page,
> > >  		debug_check_no_obj_freed(page_address(page),
> > >  					   PAGE_SIZE << order);
> > >  	}
> > > -	arch_free_page(page, order);
> > >  	if (want_init_on_free())
> > >  		kernel_init_free_pages(page, 1 << order);
> > >  
> > >  	kernel_poison_pages(page, 1 << order, 0);
> > > +	arch_free_page(page, order);
> > >  	if (debug_pagealloc_enabled())
> > >  		kernel_map_pages(page, 1 << order, 0);
> > 
> > This is all fairly mature code, isn't it?  What happened to make this
> > problem pop up now?
> 
> In the past, there is only kernel_poison_pages() would trigger it but it needs
> "page_poison=on" kernel cmdline, and I suspect nobody tested that on s390 in the
> past.

Yes. Peter Oberparleiter reported this also before my short vacation,
but I didn't have time to look into this. Thanks for fixing!

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>



  reply	other threads:[~2019-09-30  7:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27 19:47 Qian Cai
2019-09-27 20:48 ` Andrew Morton
2019-09-27 21:15   ` Qian Cai
2019-09-30  7:44     ` Heiko Carstens [this message]
2019-09-27 21:02 ` Andrew Morton
2019-09-27 21:28   ` Qian Cai
2019-09-27 21:59     ` Andrew Morton
2019-09-27 22:17       ` Alexander Duyck
2019-09-28  9:06         ` David Hildenbrand
2019-09-30  6:27           ` Christian Borntraeger
2019-09-30  6:30       ` Christian Borntraeger
2019-09-30 11:00 ` Michal Hocko
2019-09-30 11:04 ` Kirill A. Shutemov
2019-09-30 11:22   ` Qian Cai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190930074437.GB5604@osiris \
    --to=heiko.carstens@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=cai@lca.pw \
    --cc=gor@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=oberpar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox