summaryrefslogtreecommitdiff
path: root/drivers/misc/uacce/uacce.c
diff options
context:
space:
mode:
authorZhangfei Gao <zhangfei.gao@linaro.org>2020-06-15 16:55:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-10 15:50:51 +0300
commit51d501e540e6edd6737c0f1383b7789232595c13 (patch)
treeaaf8c78d03e02e50ada20c2f794af81c6aae06cd /drivers/misc/uacce/uacce.c
parent8b66c917c41b966cd230d30c0268795e3f9eb5e4 (diff)
downloadlinux-51d501e540e6edd6737c0f1383b7789232595c13.tar.xz
uacce: remove uacce_vma_fault
Fix NULL pointer error if removing uacce's parent module during app's running. SIGBUS is already reported by do_page_fault, so uacce_vma_fault is not needed. If providing vma_fault, vmf->page has to be filled as well, required by __do_fault. Reported-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Link: https://lore.kernel.org/r/1592229357-1904-1-git-send-email-zhangfei.gao@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/uacce/uacce.c')
-rw-r--r--drivers/misc/uacce/uacce.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
index 107028e77ca3..aa91f69a5fa9 100644
--- a/drivers/misc/uacce/uacce.c
+++ b/drivers/misc/uacce/uacce.c
@@ -179,14 +179,6 @@ static int uacce_fops_release(struct inode *inode, struct file *filep)
return 0;
}
-static vm_fault_t uacce_vma_fault(struct vm_fault *vmf)
-{
- if (vmf->flags & (FAULT_FLAG_MKWRITE | FAULT_FLAG_WRITE))
- return VM_FAULT_SIGBUS;
-
- return 0;
-}
-
static void uacce_vma_close(struct vm_area_struct *vma)
{
struct uacce_queue *q = vma->vm_private_data;
@@ -199,7 +191,6 @@ static void uacce_vma_close(struct vm_area_struct *vma)
}
static const struct vm_operations_struct uacce_vm_ops = {
- .fault = uacce_vma_fault,
.close = uacce_vma_close,
};