]> git.baikalelectronics.ru Git - kernel.git/commit
cxl: Fix off by one error allowing subsequent mmap page to be accessed
authorIan Munsie <imunsie@au1.ibm.com>
Tue, 7 Jul 2015 05:45:45 +0000 (15:45 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 8 Jul 2015 05:17:47 +0000 (15:17 +1000)
commitf9d5f5627b85a7b7865a70d43ec7646150556897
treeacd7285af4b5dfa807aac35aee9ed1f648c7475b
parent4d9e73bbb7657392a62dcbdc007e145fcbd3c9b9
cxl: Fix off by one error allowing subsequent mmap page to be accessed

It was discovered that if a process mmaped their problem state area they
were able to access one page more than expected, potentially allowing
them to access the problem state area of an unrelated process.

This was due to a simple off by one error in the mmap fault handler
introduced in f949556ae1d25d4d7b018d3398ec92094f78fed1 ("cxl: Fix issues
when unmapping contexts"), which is fixed in this patch.

Cc: stable@vger.kernel.org
Fixes: f949556ae1d2 ("cxl: Fix issues when unmapping contexts")
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/context.c