LTS: Merge android-4.14-stable (4.14.257) into android-msm-pixel-4.14

Merge android-4.14-stable common kernel (4.14.257) into C2F2/S5 master kernel.

Bug: 210364486
Test: Manual testing, SST, vts/vts-kernel, pts/base, pts/postsubmit-long
Signed-off-by: JohnnLee <johnnlee@google.com>
Change-Id: I7756efa86610edae614da6033c174cd20fe29663
diff --git a/drivers/char/oscar/gasket_page_table.c b/drivers/char/oscar/gasket_page_table.c
index 8729094..6fc37e0 100644
--- a/drivers/char/oscar/gasket_page_table.c
+++ b/drivers/char/oscar/gasket_page_table.c
@@ -1529,6 +1529,7 @@
 	if (num_pages == 0)
 		return -EINVAL;
 
+	mutex_lock(&gasket_dev->page_table[index]->mutex);
 	mem = dma_alloc_coherent(gasket_dev->dma_dev, num_pages * PAGE_SIZE,
 				 &handle, GFP_KERNEL);
 	if (!mem)
@@ -1556,6 +1557,7 @@
 			(u64)mem + j * PAGE_SIZE;
 	}
 
+	mutex_unlock(&gasket_dev->page_table[index]->mutex);
 	return 0;
 
 nomem:
@@ -1570,6 +1572,7 @@
 	kfree(gasket_dev->page_table[index]->coherent_pages);
 	gasket_dev->page_table[index]->coherent_pages = NULL;
 	gasket_dev->page_table[index]->num_coherent_pages = 0;
+	mutex_unlock(&gasket_dev->page_table[index]->mutex);
 	return -ENOMEM;
 }
 
@@ -1599,6 +1602,7 @@
 	if (!gasket_dev->page_table[index])
 		return;
 
+	mutex_lock(&gasket_dev->page_table[index]->mutex);
 	if (gasket_dev->coherent_buffer.length_bytes) {
 		dma_free_coherent(gasket_dev->dma_dev,
 				  gasket_dev->coherent_buffer.length_bytes,
@@ -1612,6 +1616,7 @@
 	kfree(gasket_dev->page_table[index]->coherent_pages);
 	gasket_dev->page_table[index]->coherent_pages = NULL;
 	gasket_dev->page_table[index]->num_coherent_pages = 0;
+	mutex_unlock(&gasket_dev->page_table[index]->mutex);
 }
 
 /*