summaryrefslogtreecommitdiff
path: root/gxp-mapping.c
diff options
context:
space:
mode:
authorAurora pro automerger <aurora-pro-automerger@google.com>2022-07-19 08:41:41 +0000
committerJohn Scheible <johnscheible@google.com>2022-07-25 18:55:04 +0000
commit51345064a78c4fbee30e5c331a41c0dfab852fa0 (patch)
treec49363432f8d27d687608f9475be184f10b28ac2 /gxp-mapping.c
parent965bb96998a383ae25c88da8c095f375bfb5e240 (diff)
downloadgs201-51345064a78c4fbee30e5c331a41c0dfab852fa0.tar.gz
[Copybara Auto Merge] Merge branch 'gs201-release' into 'android13-gs-pixel-5.10-tm-qpr1'
Revert "gxp: avoid holding semaphore during mmap" Revert "gxp: Disable telemetry before free" gxp: fix deadlock on power states queue full Bug: 236087752 gxp: warn deprecate pwr states only once Bug: 237337595 gxp: don't modify clkmux state during core booting Bug: 238960149 gxp: increase the waiting time for cores booting Bug: 237378056 gxp: Disable telemetry before free Bug: 235771175 gxp: avoid holding semaphore during mmap Bug: 232183143 gxp: parallelize the firmware startup process Bug: 207036666 gxp: hold mmap lock around call to find_extend_vma Bug: 237404338 gxp: Fix bug when clearing FW buffers on auth fail Bug: 237789581 gxp: deprecate NON_AGGRESSOR / add LOW_FREQ_CLKMUX Bug: 237337595 (repeat) Bug: 237378056 (repeat) GitOrigin-RevId: 75508d46deac85970c4d556770c105eaa4f2a2e8 Change-Id: Id50f1b68834e687178d66e0d239d1be42e0e2152
Diffstat (limited to 'gxp-mapping.c')
-rw-r--r--gxp-mapping.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gxp-mapping.c b/gxp-mapping.c
index 6bdd707..9a69173 100644
--- a/gxp-mapping.c
+++ b/gxp-mapping.c
@@ -7,6 +7,7 @@
#include <linux/dma-mapping.h>
#include <linux/mm.h>
+#include <linux/mmap_lock.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
@@ -83,6 +84,7 @@ struct gxp_mapping *gxp_mapping_create(struct gxp_dev *gxp,
* it with FOLL_WRITE.
* default to read/write if find_extend_vma returns NULL
*/
+ mmap_read_lock(current->mm);
vma = find_extend_vma(current->mm, user_address & PAGE_MASK);
if (vma) {
if (!(vma->vm_flags & VM_WRITE))
@@ -91,6 +93,7 @@ struct gxp_mapping *gxp_mapping_create(struct gxp_dev *gxp,
dev_dbg(gxp->dev,
"unable to find address in VMA, assuming buffer writable");
}
+ mmap_read_unlock(current->mm);
/* Pin the user pages */
offset = user_address & (PAGE_SIZE - 1);