Skip to content

Dropping chrdev/miscdev::Registration and similar #233

Closed
@adamrk

Description

@adamrk

The current setup of chrdev and miscdev will lead to UAF if the returned Registration is dropped, but there's nothing that prevents the device driver from doing that. It's pretty clear from the examples, but it'd just be a shame if someone trying this out for the first time writes a very simple driver in totally safe Rust and gets a UAF error because they miss this point.

I also introduced a new type like this in #232 so if we end up with a bunch then maybe there should at least be some documentation/warnings about them? Not sure if we can do anything better than.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions