projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9da3242
)
ipx: call ipxitf_put() in ioctl error path
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 2 May 2017 10:58:53 +0000
(13:58 +0300)
committer
David S. Miller
<davem@davemloft.net>
Tue, 2 May 2017 19:34:53 +0000
(15:34 -0400)
We should call ipxitf_put() if the copy_to_user() fails.
Reported-by: 李强 <liqiang6-s@360.cn>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipx/af_ipx.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipx/af_ipx.c
b/net/ipx/af_ipx.c
index 8a9219ff2e77e0205de652974a44c5e4ba33b2c0..fa31ef29e3fa0bf3973e12e43c57b48eb7d1be45 100644
(file)
--- a/
net/ipx/af_ipx.c
+++ b/
net/ipx/af_ipx.c
@@
-1168,11
+1168,10
@@
static int ipxitf_ioctl(unsigned int cmd, void __user *arg)
sipx->sipx_network = ipxif->if_netnum;
memcpy(sipx->sipx_node, ipxif->if_node,
sizeof(sipx->sipx_node));
- rc =
-EFAULT
;
+ rc =
0
;
if (copy_to_user(arg, &ifr, sizeof(ifr)))
-
break
;
+
rc = -EFAULT
;
ipxitf_put(ipxif);
- rc = 0;
break;
}
case SIOCAIPXITFCRT: