mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
xfrm: Return the correct errno code
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>
This commit is contained in:
parent
bf3da527bb
commit
4ac7a6eecb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user