Re: [PATCH 10/14] bpf/tests: Add branch conversion JIT test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 29, 2021 at 1:59 AM Yonghong Song <yhs@xxxxxx> wrote:
> > +static int bpf_fill_long_jmp(struct bpf_test *self)
> > +{
> > +     unsigned int len = BPF_MAXINSNS;
> > +     struct bpf_insn *insn;
> > +     int i;
> > +
> > +     insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL);
> > +     if (!insn)
> > +             return -ENOMEM;
>
> When insn will be freed?

It is freed by the existing test runner code. If the fill_helper
member is set, the function destroy_bpf_tests frees the insn pointer
in that test case. This is the same as with other tests that use the
fill_helper facility.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux