[Intel-gfx] [mm] 2037ab69a5: BUG:KASAN:null-ptr-deref_in_t
Matthew Wilcox
willy at infradead.org
Mon Sep 14 11:27:38 UTC 2020
On Mon, Sep 14, 2020 at 04:55:45PM +0800, kernel test robot wrote:
> Greeting,
>
> FYI, we noticed the following commit (built with gcc-9):
>
> commit: 2037ab69a5cd8afe58347135010f6160ea368dd0 ("mm: Convert find_get_entry to return the head page")
Thank you!
diff --git a/mm/swap_state.c b/mm/swap_state.c
index c2fb62f660a5..a22c2430e80c 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -427,6 +427,8 @@ struct page *find_get_incore_page(struct address_space *mapping, pgoff_t index)
struct swap_info_struct *si;
struct page *page = find_get_entry(mapping, index);
+ if (!page)
+ return page;
if (!xa_is_value(page))
return find_subpage(page, index);
if (!shmem_mapping(mapping))
More information about the Intel-gfx
mailing list