Re: [PATCH bpf-next v5 4/7] bpf: Introduce support for bpf_local_irq_{save,restore}

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

 



On Tue, 3 Dec 2024 at 01:05, Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Thu, Nov 28, 2024 at 4:16 PM Kumar Kartikeya Dwivedi
> <memxor@xxxxxxxxx> >         enum ref_state_type {
> > -               REF_TYPE_PTR = 0,
> > -               REF_TYPE_LOCK,
> > +               REF_TYPE_PTR    = 1,
> > +               REF_TYPE_IRQ    = 2,
> > +
> > +               REF_TYPE_LOCK   = 3,
> >         } type;
>
> why extra empty line?
>

To separate the lock types from others, but I can drop it.

> why renumber ?

To ensure we don't get assigned REF_TYPE_PTR by default after
acquire_reference_state, if someone forgets to assign the type it will
be REF_TYPE_PTR.
Right now with 1 it will get caught by refsafe's default WARN. I
caused this myself so decided it's better to be more explicit.





[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