]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
device-dax: fail all private mapping attempts
authorDan Williams <dan.j.williams@intel.com>
Wed, 16 Nov 2016 17:00:38 +0000 (09:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Dec 2016 08:10:33 +0000 (09:10 +0100)
commit8d248df485f2f2adf4b6ed7a7855e09c0dffeff7
tree40d53a67bfecab20621fa81f2b754ab5b1680366
parentf87a483126b5e3f8f03eb778fd18fb5633a14a89
device-dax: fail all private mapping attempts

commit 4cb19355ea19995941ccaad115dbfac6b75215ca upstream.

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: Dave Hansen <dave.hansen@linux.intel.com>
Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap")
Reported-by: Pawel Lebioda <pawel.lebioda@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dax/dax.c