]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: fix handling of page table constructor failure
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 15 Dec 2020 03:07:59 +0000 (19:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:41 +0000 (12:13 -0800)
commit3557f0e14e5f6255c1649ab4fcfaaf219c87e8d0
tree1ebf75142e107054b5b53bca541d173b6d5f1c34
parent2ebd2f741e1a9812b0d4470e00f7ba9b4c7e31d8
sparc: fix handling of page table constructor failure

The page has just been allocated, so its refcount is 1.  free_unref_page()
is for use on pages which have a zero refcount.  Use __free_page() like
the other implementations of pte_alloc_one().

Link: https://lkml.kernel.org/r/20201125034655.27687-1-willy@infradead.org
Fixes: dd5d4836f846 ("sparc: handle pgtable_page_ctor() fail")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/sparc/mm/init_64.c