Skip to content

Commit 6ab690a

Browse files
thejhborkmann
authored andcommitted
bpf: sockmap remove dead check
Remove dead code that bails on `attr->value_size > KMALLOC_MAX_SIZE` - the previous check already bails on `attr->value_size != 4`. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 0a0a7e0 commit 6ab690a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

kernel/bpf/sockmap.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,9 +1442,6 @@ static struct bpf_map *sock_map_alloc(union bpf_attr *attr)
14421442
attr->value_size != 4 || attr->map_flags & ~SOCK_CREATE_FLAG_MASK)
14431443
return ERR_PTR(-EINVAL);
14441444

1445-
if (attr->value_size > KMALLOC_MAX_SIZE)
1446-
return ERR_PTR(-E2BIG);
1447-
14481445
err = bpf_tcp_ulp_register();
14491446
if (err && err != -EEXIST)
14501447
return ERR_PTR(err);

0 commit comments

Comments
 (0)