The patches that Linus posted are relatively small and self contained and from reading the thread it seems came from a series of in depth conversations with Claude and were carefully reviewed by Linus.
So what we're seeing here is a tricky concurrency bug that even an expert would make. You can't use it as an example of slop