Re: [PATCH v3] tty: tty_io: remove hung_up_tty_fops

From: Linus Torvalds
Date: Fri May 03 2024 - 20:14:51 EST


On Fri, 3 May 2024 at 16:59, Paul E. McKenney <paulmck@xxxxxxxxxx> wrote:
>
> Hmmm... Maybe something like this very lightly tested patch?

I'm a bit nervous about using the built-in atomics, when it's not
clear what the compiler will do on various architectures.

Gcc documentation talks about __atomic_is_lock_free(), which makes me
think that on various architectures it might end up doing some "fall
back to helper functions" cases (possibly for odd architectures).

IOW: I don't think the patch is wrong, but I do think we need to
verify that all compilers we support generate the obvious code for
this, and we don't have some "fall back to function calls".

Linus