summaryrefslogtreecommitdiff
path: root/include/linux/uacce.h
diff options
context:
space:
mode:
authorZhangfei Gao <zhangfei.gao@linaro.org>2020-02-26 15:12:06 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2020-03-06 12:28:24 +1100
commitacc670dba9f57298a6afd7cdfc9a7254292bbec9 (patch)
tree410cb9948a539b6aec465e93a4af15cc63e32768 /include/linux/uacce.h
parent732e540953477083082e999ff553622c59cffd5f (diff)
uacce: unmap remaining mmapping from user space
When uacce parent device module is removed, user app may still keep the mmaped area, which can be accessed unsafely. When rmmod, Parent device driver will call uacce_remove, which unmap all remaining mapping from user space for safety. VM_FAULT_SIGBUS is also reported to user space accordingly. Suggested-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/uacce.h')
-rw-r--r--include/linux/uacce.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/uacce.h b/include/linux/uacce.h
index 904a461591a3..0e215e6d0534 100644
--- a/include/linux/uacce.h
+++ b/include/linux/uacce.h
@@ -98,6 +98,7 @@ struct uacce_queue {
* @priv: private pointer of the uacce
* @mm_list: list head of uacce_mm->list
* @mm_lock: lock for mm_list
+ * @inode: core vfs
*/
struct uacce_device {
const char *algs;
@@ -113,6 +114,7 @@ struct uacce_device {
void *priv;
struct list_head mm_list;
struct mutex mm_lock;
+ struct inode *inode;
};
/**