staging: android: ashmem: Fix a race condition in pin ioctls
authorBen Hutchings <ben@decadent.org.uk>
Sun, 4 Feb 2018 02:06:27 +0000 (02:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 16:50:09 +0000 (17:50 +0100)
commitce8a3a9e76d0193e2e8d74a06d275b3c324ca652
tree4b391937fe744d7261b670002b1e67c7dff73a8c
parent02b7b2844c2ffd3b614ec2b9293e8c7f041d60da
staging: android: ashmem: Fix a race condition in pin ioctls

ashmem_pin_unpin() reads asma->file and asma->size before taking the
ashmem_mutex, so it can race with other operations that modify them.

Build-tested only.

Cc: stable@vger.kernel.org
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ashmem.c