dax: fix NULL pointer in __dax_pmd_fault()
Commit 46c043ede471 ("mm: take i_mmap_lock in unmap_mapping_range() for
DAX") moved some code in __dax_pmd_fault() that was responsible for
zeroing newly allocated PMD pages. The new location didn't properly set
up 'kaddr', so when run this code resulted in a NULL pointer BUG.
Fix this by getting the correct 'kaddr' via bdev_direct_access().
Signed-off-by: Ross Zwisler <email@example.com>
Reported-by: Dan Williams <firstname.lastname@example.org>
Reviewed-by: Dan Williams <email@example.com>
Cc: Alexander Viro <firstname.lastname@example.org>
Cc: Matthew Wilcox <email@example.com>
Cc: "Kirill A. Shutemov" <firstname.lastname@example.org>
Cc: Dave Chinner <email@example.com>
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>
1 file changed