Re: [PATCH bpf-next v2 4/4] selftests/bpf: convert test_skb_cgroup_id_user to test_progs

From: Alexis Lothoré
Date: Mon Aug 12 2024 - 03:23:18 EST


Hello Martin,

On 8/10/24 01:53, Martin KaFai Lau wrote:
> On 8/6/24 12:55 AM, Alexis Lothoré (eBPF Foundation) wrote:

[...]

>> +    SYS(fail, "ip link add dev %s type veth peer name %s", VETH_1, VETH_2);
>> +    SYS(fail, "ip link set %s up", VETH_1);
>> +    SYS(fail, "ip link set %s up", VETH_2);
>
> Same. Do it under a new netns.
>
>> +

[...]

>> +    if (setup_network(&t))
>> +        goto cleanup_progs;
>> +
>> +    cgroup_fd = cgroup_setup_and_join(CGROUP_PATH);
>
> cgroup_fd is leaked.

ACK, I will prepare a new revision with all the leaked file descriptors you have
spotted fixed, and with tests performed in a dedicated netns.

> Thanks for working on this.

Thanks for the review !

Alexis

--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com