twx-linux/drivers/staging/android
Tobias Lindskog 173a4906ae staging: android: ashmem: Shrink directly through shmem_fallocate
When ashmem_shrink is called from direct reclaim on a user thread, a
call to do_fallocate will check for permissions against the security
policy of that user thread.  It can thus fail by chance if called on a
thread that isn't permitted to modify the relevant ashmem areas.

Because we know that we have a shmem file underneath, call the shmem
implementation of fallocate directly instead of going through the
user-space interface for fallocate.

Signed-off-by: Tobias Lindskog <tobias.lindskog@sonymobile.com>
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 11:49:16 +02:00
..
ion staging: android: ion: Return an ERR_PTR in ion_map_kernel 2018-06-25 22:54:04 +08:00
uapi
ashmem.c staging: android: ashmem: Shrink directly through shmem_fallocate 2018-07-16 11:49:16 +02:00
ashmem.h
Kconfig
Makefile
TODO
vsoc.c staging: android/vsoc: stop using 'timespec' 2018-06-28 21:57:06 +09:00