Hi,
On 2020/2/25 16:33, zhangfei wrote:
Hi, Zaibo
On 2020/2/24 下午3:17, Xu Zaibo wrote:
@@ -585,6 +595,13 @@ void uacce_remove(struct uacce_device *uacce)
cdev_device_del(uacce->cdev, >dev);
xa_erase(_xa, uacce->dev_id);
put_device(>dev);
+
+/*
+ * unmap
Hi, Zaibo
On 2020/2/24 下午3:17, Xu Zaibo wrote:
@@ -585,6 +595,13 @@ void uacce_remove(struct uacce_device *uacce)
cdev_device_del(uacce->cdev, >dev);
xa_erase(_xa, uacce->dev_id);
put_device(>dev);
+
+ /*
+ * unmap remainning mapping from user space, preventing
Hi Zhangfei,
On 2020/2/24 15:06, Zhangfei Gao wrote:
When uacce parent device module is removed, user app may
still keep the mmaped area, which can be accessed unsafely.
When rmmod, Parent device drvier will call uacce_remove,
which unmap all remaining mapping from user space for safety.
When uacce parent device module is removed, user app may
still keep the mmaped area, which can be accessed unsafely.
When rmmod, Parent device drvier will call uacce_remove,
which unmap all remaining mapping from user space for safety.
VM_FAULT_SIGBUS is also reported to user space accordingly.