aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-12-02 21:44:00 +0000
committersaturneric <[email protected]>2025-12-02 21:44:00 +0000
commitaa766e96efd6b62fd4dc7750134624f2c633cc55 (patch)
tree06078a9d8cbb6227f541e18545aa68f082d86242 /net/xfrm/xfrm_user.c
parentMerge tag 'v6.17.8' into linux-6.17.y (diff)
parentLinux 6.17.10 (diff)
downloadkernel-linux-6.17.y.tar.gz
kernel-linux-6.17.y.zip
Merge tag 'v6.17.10' into linux-6.17.ylinux-6.17.y
This is the 6.17.10 stable release
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 684239018bec..977a03291f6a 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -947,8 +947,11 @@ static struct xfrm_state *xfrm_state_construct(struct net *net,
if (attrs[XFRMA_SA_PCPU]) {
x->pcpu_num = nla_get_u32(attrs[XFRMA_SA_PCPU]);
- if (x->pcpu_num >= num_possible_cpus())
+ if (x->pcpu_num >= num_possible_cpus()) {
+ err = -ERANGE;
+ NL_SET_ERR_MSG(extack, "pCPU number too big");
goto error;
+ }
}
err = __xfrm_init_state(x, extack);