• Aneesh Kumar K.V's avatar
    fs/dax: Deposit pagetable even when installing zero page · d12bcf87
    Aneesh Kumar K.V authored
    commit 11cf9d86 upstream.
    
    Architectures like ppc64 use the deposited page table to store hardware
    page table slot information. Make sure we deposit a page table when
    using zero page at the pmd level for hash.
    
    Without this we hit
    
    Unable to handle kernel paging request for data at address 0x00000000
    Faulting instruction address: 0xc000000000082a74
    Oops: Kernel access of bad area, sig: 11 [#1]
    ....
    
    NIP [c000000000082a74] __hash_page_thp+0x224/0x5b0
    LR [c0000000000829a4] __hash_page_thp+0x154/0x5b0
    Call Trace:
     hash_page_mm+0x43c/0x740
     do_hash_page+0x2c/0x3c
     copy_from_iter_flushcache+0xa4/0x4a0
     pmem_copy_from_iter+0x2c/0x50 [nd_pmem]
     dax_copy_from_iter+0x40/0x70
     dax_iomap_actor+0x134/0x360
     iomap_apply+0xfc/0x1b0
     dax_iomap_rw+0xac/0x130
     ext4_file_write_iter+0x254/0x460 [ext4]
     __vfs_write+0x120/0x1e0
     vfs_write+0xd8/0x220
     SyS_write+0x6c/0x110
     system_call+0x3c/0x130
    
    Fixes: b5beae5e ("powerpc/pseries: Add driver for PAPR SCM regions")
    Cc: <stable@vger.kernel.org>
    Reviewed-by: 's avatarJan Kara <jack@suse.cz>
    Signed-off-by: 's avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
    Signed-off-by: 's avatarDan Williams <dan.j.williams@intel.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d12bcf87
dax.c 46 KB