Re: [GIT pull] sched/core for v5.16-rc1

From: Linus Torvalds
Date: Mon Nov 01 2021 - 17:28:11 EST


On Mon, Nov 1, 2021 at 2:01 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Unwinders that need locks because they can do bad things if they are
> working on unstable data are EVIL and WRONG.

Note that this is fundamental: if you can fool an unwider to do
something bad just because the data isn't stable, then the unwinder is
truly horrendously buggy, and not usable.

It could be a user process doing bad things to the user stack frame
from another thread when profiling is enabled.

It could be debug code unwinding without locks for random reasons.

So I really don't like "take a lock for unwinding". It's a pretty bad
bug if the lock required.

I have to say, that commit message is pretty bad too. It doesn't
actually explain why this is needed. It just talks about the alleged
reasons why it should be stable, with no explanation of why that would
be an issue, and worth taking a core lock over.

The "Link" in the commit also is entirely useless, pointing back to
the emailed submission of the patch, rather than any useful discussion
about why the patch happened.

Linus