]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 2 Oct 2015 01:42:35 +0000 (21:42 -0400)
commitd6315de7a23bd8c28a9f867ffaa0d08c142903a5
tree059bcaf04ab8cce9fdc5b3d6698044da7ade9de8
parent0c5d926023984eac78b688324def253ba7f476e6
dax: fix NULL pointer in __dax_pmd_fault()

Commit 233b467c6061 ("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>
fs/dax.c