Re: [TECH TOPIC] Rust for Linux

Mark Brown
2021-07-07T10:50:33Z

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

On Tue, Jul 06, 2021 at 10:36:14PM +0200, Linus Walleij wrote:
> On Tue, Jul 6, 2021 at 10:00 PM Roland Dreier <roland@kernel.org> wrote:

> > "devres" / devm_xxx was an attempt to deal with this in C, but it only
> > solves some cases of this and has not received a lot of adoption (we
> > can argue about the reasons).

> Really? From my point of view that is adopted all over the map.
> I add new users all the time and use it as much as I can when
> writing new drivers.

Yes, it's *super* widely used in most of the kernel. Perhaps there's
some subsystems that reject it for some reason.

> I think it's a formidable success, people just need to learn to do it more.

There *are* issues with people adopting it too enthusiastically - as
well as the memory lifetime issues that Laurent mentioned it's easy for
it to cause problems with interrupt handlers that are left live longer
than they should be and try to use things that were already deallocated.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]