On Tue, Jan 11, 2022 at 1:27 PM Jan Kara <jack@xxxxxxx> wrote: > > That's not quite true. max_select_fd() called from do_select() will bail > with -EBADF if any set contains a bit that is not in > current->files->open_fds. Yeah, that probably does take care of any normal case, since you need the race with close() to actually cause issues. Good point. Linus