]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dax: fix NULL pointer in __dax_pmd_fault()
authorRoss Zwisler <ross.zwisler@linux.intel.com>
Thu, 1 Oct 2015 22:36:59 +0000 (15:36 -0700)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:19:57 +0000 (12:19 -0500)
commit795a861140c9413927cd86cc66e6760828bc7af7
treeeed74a48f8688b6508ff9995aca72c0d4e3c78a7
parent3ad5ae263892ad3946ede47323e7011813933580
dax: fix NULL pointer in __dax_pmd_fault()

Orabug: 22913653

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 <ross.zwisler@linux.intel.com>
Reported-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 8346c416d17bf5b4ea1508662959bb62e73fd6a5)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/dax.c