On Sun, 9 Jun 2024 at 19:45, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > Unless I'm misreading that code (entirely possible), this fdput() shouldn't > be done until we are done with stt. Ack. That looks right to me. If I follow it right, the lifetime of stt is tied to the lifetime of the file (plus RCU), so doing fdput early and then dropping the RCU lock means that stt may not be valid any more later. Making it use the auto-release of a fd class sounds like a good fix, but I don't know this code. Linus