Re: Rust kernel policy

Steven Rostedt
2025-02-19T15:13:31Z

On Wed, 19 Feb 2025 09:14:17 -0500
James Bottomley <James.Bottomley@HansenPartnership.com> wrote:

> I look at most of the bugfixes flowing through subsystems I watch and a
> lot of them are in error legs. Usually around kfree cockups (either
> forgetting or freeing to early). Could we possibly fix a lot of this
> by adopting the _cleanup_ annotations[1]? I've been working in systemd
> code recently and they seem to make great use of this for error leg
> simplification.

And the tracing subsystem has already been moving in that direction.

https://lore.kernel.org/all/20241219201158.193821672@goodmis.org/
https://lore.kernel.org/all/173630223453.1453474.6442447279377996686.stgit@devnote2/

I need to add this logic to my tracing libraries too. That's on my TODO list.

-- Steve