projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b2af24
)
kcm: remove a useless copy_from_user()
author
WANG Cong
<
[email protected]
>
Thu, 13 Apr 2017 18:38:02 +0000
(11:38 -0700)
committer
David S. Miller
<
[email protected]
>
Mon, 17 Apr 2017 17:28:48 +0000
(13:28 -0400)
struct kcm_clone only contains fd, and kcm_clone() only
writes this struct, so there is no need to copy it from user.
Cc: Tom Herbert <
[email protected]
>
Signed-off-by: Cong Wang <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/kcm/kcmsock.c
patch
|
blob
|
history
diff --git
a/net/kcm/kcmsock.c
b/net/kcm/kcmsock.c
index 31762f76cdb5f2a3ec322135068402be532218ed..deca20fb2ce2e5e50063e58ec2c0d9d6239d3bd4 100644
(file)
--- a/
net/kcm/kcmsock.c
+++ b/
net/kcm/kcmsock.c
@@
-1707,11
+1707,7
@@
static int kcm_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
struct kcm_clone info;
struct socket *newsock = NULL;
- if (copy_from_user(&info, (void __user *)arg, sizeof(info)))
- return -EFAULT;
-
err = kcm_clone(sock, &info, &newsock);
-
if (!err) {
if (copy_to_user((void __user *)arg, &info,
sizeof(info))) {