Re: [PATCH] btf: Simplify BTF logic with use of __free(btf_put)

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

 



On Fri, 1 Aug 2025 08:12:08 -0700
Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote:

> 
> You can use it in kernel/trace/trace_output.c, of course,

I guess that means I should just use the DEFINE_FREE() in that file
directly and not in the btf.h header file?

> but I really think it's a step back in maintainability.
> All this cleanup.h is not a silver bullet. It needs to be used sparingly.

I have my reservations about the cleanup.h code too. But the more I use it,
the more I like it. My biggest worry is guard() leak. That is, having a
lock or interrupt/preemption disabled for longer than they need to be,
because code was added at the end of the function after the protection is
needed.

-- Steve




[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