From: Matthew Wilcox <willy@infradead.org>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: akpm@linux-foundation.org, corbet@lwn.net, linux-mm@kvack.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
rick.p.edgecombe@intel.com
Subject: Re: [PATCH v2 1/3] mm/page_table_check: Do WARN_ON instead of BUG_ON
Date: Sun, 23 Jul 2023 02:56:51 +0100 [thread overview]
Message-ID: <ZLyI48BYnecaROmZ@casper.infradead.org> (raw)
In-Reply-To: <20230722231508.1030269-2-pasha.tatashin@soleen.com>
On Sat, Jul 22, 2023 at 11:15:06PM +0000, Pasha Tatashin wrote:
> static struct page_table_check *get_page_table_check(struct page_ext *page_ext)
> {
> - BUG_ON(!page_ext);
> + PAGE_TABLE_CHECK_WARN(!page_ext);
> +
> return (void *)(page_ext) + page_table_check_ops.offset;
> }
[...]
> @@ -137,15 +144,15 @@ void __page_table_check_zero(struct page *page, unsigned int order)
> struct page_ext *page_ext;
> unsigned long i;
>
> - BUG_ON(PageSlab(page));
> + PAGE_TABLE_CHECK_WARN(PageSlab(page));
>
> page_ext = page_ext_get(page);
> - BUG_ON(!page_ext);
> + PAGE_TABLE_CHECK_WARN(!page_ext);
> for (i = 0; i < (1ul << order); i++) {
> struct page_table_check *ptc = get_page_table_check(page_ext);
Seems like we're going to warn about !page_ext twice? Or more than
twice -- once per tail page?
But then we'll crash because page_ext was NULL and offset was small?
next prev parent reply other threads:[~2023-07-23 1:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 23:15 [PATCH v2 0/3] page table check warn instead of panic Pasha Tatashin
2023-07-22 23:15 ` [PATCH v2 1/3] mm/page_table_check: Do WARN_ON instead of BUG_ON Pasha Tatashin
2023-07-23 1:56 ` Matthew Wilcox [this message]
2023-07-23 3:35 ` Pasha Tatashin
2023-07-22 23:15 ` [PATCH v2 2/3] doc/vm: add information about page_table_check warn_on behavior Pasha Tatashin
2023-07-22 23:59 ` Randy Dunlap
2023-07-23 3:37 ` Pasha Tatashin
2023-07-22 23:15 ` [PATCH v2 3/3] mm/page_table_check: Check writable zero page in page table check Pasha Tatashin
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=ZLyI48BYnecaROmZ@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=rick.p.edgecombe@intel.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