summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Kjos <tkjos@google.com>2019-08-12 10:11:52 -0700
committerTodd Kjos <tkjos@google.com>2019-08-12 11:58:44 -0700
commita289800482a22c978d863d0c6d38c24efb3baa55 (patch)
treeb137974af6841876993e9c6492b1100e85fd234e
parent74c82193e89daaa486f49dc8a4f8ed38f0460159 (diff)
ANDROID: fix binder change in merge of 4.4.183
The 4.4.183 merge was missing the change to the binder driver associated with the linux-4.4.y commit 8f6345a11caa ("coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping"). It was left out because the android-4.4 binder driver has been significantly refactored compared to linux-4.4.y. This patch applies the missing change from that patch to the binder driver. Change-Id: I803e558cb629fedff04b14e23ac9f83e98628ede Fixes: 94fd42809f7d ("Merge 4.4.183 into android-4.4") Signed-off-by: Todd Kjos <tkjos@google.com>
-rw-r--r--drivers/android/binder_alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index c8614f3c70c4..6bea2840e70a 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -219,6 +219,11 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
if (mm) {
down_read(&mm->mmap_sem);
+ if (!mmget_still_valid(mm)) {
+ if (allocate == 0)
+ goto free_range;
+ goto err_no_vma;
+ }
vma = alloc->vma;
}