projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d773695
)
net: Return the correct errno code
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Wed, 2 Jun 2021 14:06:40 +0000
(22:06 +0800)
committer
David S. Miller
<davem@davemloft.net>
Thu, 3 Jun 2021 22:13:56 +0000
(15:13 -0700)
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/compat.c
patch
|
blob
|
history
diff --git
a/net/compat.c
b/net/compat.c
index ddd15af3a2837b3b34261d66dfbab4b9e1b81972..210fc3b4d0d833a1360c76fb455effda93864320 100644
(file)
--- a/
net/compat.c
+++ b/
net/compat.c
@@
-177,7
+177,7
@@
int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk,
if (kcmlen > stackbuf_size)
kcmsg_base = kcmsg = sock_kmalloc(sk, kcmlen, GFP_KERNEL);
if (kcmsg == NULL)
- return -ENO
BUFS
;
+ return -ENO
MEM
;
/* Now copy them over neatly. */
memset(kcmsg, 0, kcmlen);