Revert "bpf: Check percpu map value size first"

This reverts commit 22c88ba3cc.
This commit is contained in:
Ksawlii 2024-11-24 00:22:59 +01:00
parent 605451724a
commit 5ec15cdd1e
2 changed files with 0 additions and 6 deletions

View file

@ -74,9 +74,6 @@ int array_map_alloc_check(union bpf_attr *attr)
* access the elements.
*/
return -E2BIG;
/* percpu map value size is bound by PCPU_MIN_UNIT_SIZE */
if (percpu && round_up(attr->value_size, 8) > PCPU_MIN_UNIT_SIZE)
return -E2BIG;
return 0;
}

View file

@ -404,9 +404,6 @@ static int htab_map_alloc_check(union bpf_attr *attr)
* kmalloc-able later in htab_map_update_elem()
*/
return -E2BIG;
/* percpu map value size is bound by PCPU_MIN_UNIT_SIZE */
if (percpu && round_up(attr->value_size, 8) > PCPU_MIN_UNIT_SIZE)
return -E2BIG;
return 0;
}