device-dax: fail all private mapping attempts
authorDan Williams <[email protected]>
Wed, 16 Nov 2016 17:00:38 +0000 (09:00 -0800)
committerDan Williams <[email protected]>
Wed, 16 Nov 2016 17:00:38 +0000 (09:00 -0800)
commit4cb19355ea19995941ccaad115dbfac6b75215ca
treeec4bbe77017ce2002940f2e9c9b502a7abf648d4
parent6a84fb4b4e439a8ef0ce19ec7e7661ad76f655c9
device-dax: fail all private mapping attempts

The device-dax implementation originally tried to be tricky and allow
private read-only mappings, but in the process allowed writable
MAP_PRIVATE + MAP_NORESERVE mappings.  For simplicity and predictability
just fail all private mapping attempts since device-dax memory is
statically allocated and will never support overcommit.

Cc: <[email protected]>
Cc: Dave Hansen <[email protected]>
Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap")
Reported-by: Pawel Lebioda <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
drivers/dax/dax.c