[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250822103904.3776304-4-huangchenghai2@huawei.com>
Date: Fri, 22 Aug 2025 18:39:03 +0800
From: Chenghai Huang <huangchenghai2@...wei.com>
To: <gregkh@...uxfoundation.org>, <zhangfei.gao@...aro.org>,
<wangzhou1@...ilicon.com>
CC: <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>,
<linux-crypto@...r.kernel.org>, <fanghao11@...wei.com>,
<shenyang39@...wei.com>, <qianweili@...wei.com>, <linwenkai6@...ilicon.com>,
<liulongfang@...wei.com>
Subject: [PATCH 3/4] uacce: implement mremap in uacce_vm_ops to return -EPERM
From: Yang Shen <shenyang39@...wei.com>
The current uacce_vm_ops does not support the mremap operation of
vm_operations_struct. Implement .mremap to return -EPERM to remind
users
Fixes: 015d239ac014 ("uacce: add uacce driver")
Signed-off-by: Yang Shen <shenyang39@...wei.com>
Signed-off-by: Chenghai Huang <huangchenghai2@...wei.com>
---
drivers/misc/uacce/uacce.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
index 6a38809ca819..531a24145ba4 100644
--- a/drivers/misc/uacce/uacce.c
+++ b/drivers/misc/uacce/uacce.c
@@ -214,8 +214,14 @@ static void uacce_vma_close(struct vm_area_struct *vma)
}
}
+static int uacce_vma_mremap(struct vm_area_struct *area)
+{
+ return -EPERM;
+}
+
static const struct vm_operations_struct uacce_vm_ops = {
.close = uacce_vma_close,
+ .mremap = uacce_vma_mremap,
};
static int uacce_fops_mmap(struct file *filep, struct vm_area_struct *vma)
--
2.33.0
Powered by blists - more mailing lists