aboutsummaryrefslogtreecommitdiffstats
path: root/net/kcm
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2017-04-13 11:38:02 -0700
committerDavid S. Miller <davem@davemloft.net>2017-04-17 13:28:48 -0400
commitf5001ceab8996d76880004381c188b3b96c8c7af (patch)
tree2ffa78ba3e97559ff26084d8cf1e90b9ca8b4475 /net/kcm
parentMAINTAINERS: rename TC entry and add couple of header files (diff)
downloadlinux-dev-f5001ceab8996d76880004381c188b3b96c8c7af.tar.xz
linux-dev-f5001ceab8996d76880004381c188b3b96c8c7af.zip
kcm: remove a useless copy_from_user()
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 <tom@herbertland.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/kcm')
-rw-r--r--net/kcm/kcmsock.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 31762f76cdb5..deca20fb2ce2 100644
--- 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))) {