Re: [TECH TOPIC] Rust for Linux

Miguel Ojeda
2021-07-08T23:10:06Z

On Thu, Jul 8, 2021 at 8:44 PM Greg KH <greg@kroah.com> wrote:
>
> kref does not contain the lock, but you need to use a lock lots of time
> when dealing with them. See my response to Andy for why.

A lock may be needed in certain scenarios, but that is because
something else is involved -- i.e. to maintain the refcount itself we
don't need a lock.

Let me give an inefficient, unrealistic counter-example: we could use
an atomic with sequential consistency for the refcount.

Cheers,
Miguel