aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2023-08-24 13:28:35 +0200
committerMikael Olsson <mikael.olsson@arm.com>2023-09-07 10:42:27 +0200
commit52c563d3928077c7e50fd121162709facf20214b (patch)
tree66796bca2e72183c55fccb5230be0a90ec7010b8
parent891156d2756d8b39b189a0d816b609520882d02a (diff)
downloadethos-u-linux-driver-stack-52c563d3928077c7e50fd121162709facf20214b.tar.gz
Remove copy from user in network info IOCTL call
The network info IOCTL call doesn't use any information from the user provided struct so there is no need to copy the struct to kernel space. Change-Id: I3f58a80ab9377e4ae39fc29068de6fd6bc3d539c Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
-rw-r--r--kernel/ethosu_network.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/kernel/ethosu_network.c b/kernel/ethosu_network.c
index 6dc0ce4..71ae484 100644
--- a/kernel/ethosu_network.c
+++ b/kernel/ethosu_network.c
@@ -113,18 +113,10 @@ static long ethosu_network_ioctl(struct file *file,
case ETHOSU_IOCTL_NETWORK_INFO: {
struct ethosu_uapi_network_info uapi;
- if (copy_from_user(&uapi, udata, sizeof(uapi))) {
- ret = -EFAULT;
- break;
- }
-
- dev_info(dev,
- "Network ioctl: Network info. net=0x%pK\n",
- net);
+ dev_info(dev, "Network ioctl: Network info. net=0x%pK\n", net);
- ret =
- ethosu_network_info_request(dev, net->mailbox, net,
- &uapi);
+ ret = ethosu_network_info_request(dev, net->mailbox, net,
+ &uapi);
if (ret)
break;