projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf3da52
)
xfrm: Return the correct errno code
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Thu, 4 Feb 2021 07:42:54 +0000
(15:42 +0800)
committer
Steffen Klassert
<steffen.klassert@secunet.com>
Thu, 4 Feb 2021 08:29:27 +0000
(09:29 +0100)
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_user.c
patch
|
blob
|
history
diff --git
a/net/xfrm/xfrm_user.c
b/net/xfrm/xfrm_user.c
index 0727ac853b5509e0500c93db77ecc113bf358612..5a0ef4361e436a8ab4a5252e97583ce5b6d3dc83 100644
(file)
--- a/
net/xfrm/xfrm_user.c
+++ b/
net/xfrm/xfrm_user.c
@@
-2504,7
+2504,7
@@
static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh,
encap = kmemdup(nla_data(attrs[XFRMA_ENCAP]),
sizeof(*encap), GFP_KERNEL);
if (!encap)
- return
0
;
+ return
-ENOMEM
;
}
err = xfrm_migrate(&pi->sel, pi->dir, type, m, n, kmp, net, encap);