Re: [PATCH v4] rust: list: Add unsafe for container_of

From: Miguel Ojeda

Date: Thu Feb 19 2026 - 20:08:57 EST


On Mon, Feb 16, 2026 at 2:17 PM Philipp Stanner <phasta@xxxxxxxxxx> wrote:
>
> Add unsafe blocks to container_of to fix the issue.

So I don't think this was tested with `CLIPPY=1`, because there are
other safety comments missing even after this is applied.

Please note that `CLIPPY=1` must remain clean for all Rust code:

https://rust-for-linux.com/contributing#submit-checklist-addendum

I have pushed to `rust-fixes` the patch with placeholders to show what
is missing.

I am not sure if I will keep it there. I am not too happy introducing
`// SAFETY: TODO.`s, but it isn't worse than the status (the comments
were meant to be there), and at least this shows what is missing --
our pre-existing "good first issue" [1] may motivate new contributors
to complete them properly.

Cheers,
Miguel