diff mbox series

[4/5] mm: Check for page poison in both page_to_nid implementations

Message ID 20200408150148.25290-5-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Improve page poisoning implementation | expand

Commit Message

Matthew Wilcox April 8, 2020, 3:01 p.m. UTC
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

The earlier patch that added page poison checking in page_to_nid()
only modified one implementation; both configuration options should
have this check.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 mm/sparse.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Pasha Tatashin April 8, 2020, 3:24 p.m. UTC | #1
On Wed, Apr 8, 2020 at 11:01 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
>
> The earlier patch that added page poison checking in page_to_nid()
> only modified one implementation; both configuration options should
> have this check.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Reviewed-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Kirill A . Shutemov April 9, 2020, 2:21 p.m. UTC | #2
On Wed, Apr 08, 2020 at 08:01:47AM -0700, Matthew Wilcox wrote:
> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> 
> The earlier patch that added page poison checking in page_to_nid()
> only modified one implementation; both configuration options should
> have this check.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

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

Patch

diff --git a/mm/sparse.c b/mm/sparse.c
index 1aee5a481571..39114451408a 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -46,6 +46,7 @@  static u16 section_to_node_table[NR_MEM_SECTIONS] __cacheline_aligned;
 
 int page_to_nid(const struct page *page)
 {
+	page_poison_check(page);
 	return section_to_node_table[page_to_section(page)];
 }
 EXPORT_SYMBOL(page_to_nid);