linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kasan-dev@googlegroups.com, Qian Cai <cai@lca.pw>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Matthew Wilcox <willy@infradead.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Michal Hocko <mhocko@kernel.org>
Subject: Re: [PATCH 1/3] mm, page_owner: fix off-by-one error in __set_page_owner_handle()
Date: Thu, 26 Sep 2019 12:09:35 +0300	[thread overview]
Message-ID: <20190926090935.ofbyb2sjhi33nfp3@box> (raw)
In-Reply-To: <20190925143056.25853-2-vbabka@suse.cz>

On Wed, Sep 25, 2019 at 04:30:50PM +0200, Vlastimil Babka wrote:
> As noted by Kirill, commit 7e2f2a0cd17c ("mm, page_owner: record page owner for
> each subpage") has introduced an off-by-one error in __set_page_owner_handle()
> when looking up page_ext for subpages. As a result, the head page page_owner
> info is set twice, while for the last tail page, it's not set at all.
> 
> Fix this and also make the code more efficient by advancing the page_ext
> pointer we already have, instead of calling lookup_page_ext() for each subpage.
> Since the full size of struct page_ext is not known at compile time, we can't
> use a simple page_ext++ statement, so introduce a page_ext_next() inline
> function for that.
> 
> Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
> Fixes: 7e2f2a0cd17c ("mm, page_owner: record page owner for each subpage")
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

-- 
 Kirill A. Shutemov


  reply	other threads:[~2019-09-26  9:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 14:30 [PATCH 0/3] followups to debug_pagealloc improvements through page_owner Vlastimil Babka
2019-09-25 14:30 ` [PATCH 1/3] mm, page_owner: fix off-by-one error in __set_page_owner_handle() Vlastimil Babka
2019-09-26  9:09   ` Kirill A. Shutemov [this message]
2019-09-25 14:30 ` [PATCH 2/3] mm, debug, kasan: save and dump freeing stack trace for kasan Vlastimil Babka
2019-09-26  9:16   ` Kirill A. Shutemov
2019-09-26  9:27     ` Vlastimil Babka
2019-09-25 14:30 ` [PATCH 3/3] mm, page_owner: rename flag indicating that page is allocated Vlastimil Babka
2019-09-26  9:18   ` Kirill A. Shutemov
2019-09-26  9:26     ` Vlastimil Babka
2019-09-25 14:30 ` [PATCH 0/3] followups to debug_pagealloc improvements through page_owner Vlastimil Babka
2019-09-25 14:30 ` [PATCH 1/3] mm, page_owner: fix off-by-one error in __set_page_owner_handle() Vlastimil Babka
2019-09-25 14:30 ` [PATCH 2/3] mm, debug, kasan: save and dump freeing stack trace for kasan Vlastimil Babka
2019-09-25 14:30 ` [PATCH 3/3] mm, page_owner: rename flag indicating that page is allocated Vlastimil Babka

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=20190926090935.ofbyb2sjhi33nfp3@box \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=cai@lca.pw \
    --cc=kasan-dev@googlegroups.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).