On Thu, Sep 17, 2020 at 12:46 AM Muchun Song <songmuchun@xxxxxxxxxxxxx> wrote: > > The in_atomic macro cannot always detect atomic context. In particular, > it cannot know about held spinlocks in non-preemptible kernels. Although, > there is no user call bpf_link_put() with holding spinlock now. Be the > safe side, we can avoid this in the feature. > > Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx> Acked-by: Song Liu <songliubraving@xxxxxx> This is a little weird, but I guess that is OK, as bpf_link_put() is not in the critical path. Is the plan to eliminate in_atomic() (as much as possible)?