Messages in this thread | ![/](/images/icornerl.gif) | | From | Linus Torvalds <> | Date | Mon, 29 Apr 2024 08:38:28 -0700 | Subject | Re: [PATCH v3] tty: tty_io: remove hung_up_tty_fops |
| |
On Mon, 29 Apr 2024 at 06:56, Marco Elver <elver@google.com> wrote: > > A WRITE_ONCE() / READ_ONCE() pair would do it here. What should we use instead?
Why would we annotate a "any other code generation is insane" issues at all?
When we do chained pointer loads in
file->f_op->op()
and we say "I don't care what value I get for the middle one", I don't see the value in annotating that at all.
There is no compiler that will sanely and validly do a pointer chain load by *anything* but a load. And it doesn't matter to us if it then spills and reloads, it will *STILL* be a load.
We're not talking about "extract different bits in separate operations". We're talking about following one pointer that can point to two separate static values.
Reality matters. A *lot* more than some "C standard" that we already have ignored for decades because it's not strong enough.
Linus
| ![\](/images/icornerr.gif) |