mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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>
This commit is contained in:
parent
732e540953
commit
acc670dba9
2 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue