On Tue, Jul 30, 2024 at 11:30:51AM +0200, Lukas Wunner wrote:
From: Peter Zijlstra peterz@infradead.org
commit 54da6a0924311c7cf5015533991e44fb8eb12773 upstream.
Use __attribute__((__cleanup__(func))) to build:
simple auto-release pointers using __free()
'classes' with constructor and destructor semantics for scope-based resource management.
lock guards based on the above classes.
Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Signed-off-by: Lukas Wunner lukas@wunner.de Link: https://lkml.kernel.org/r/20230612093537.614161713%40infradead.org
Do we really want this in 5.10? Are there any compiler versions that 5.10 still has to support that will break with this?
Same for 5.15.y, I'm loath to apply this to older kernels without loads of testing.
thanks,
greg k-h