On Sun, Feb 14, 2021 at 8:38 AM Jens Axboe <axboe@xxxxxxxxx> wrote: > > > Similarly it looks like opening of "/dev/tty" fails to > > return the tty of the caller but instead fails because > > io-wq threads don't have a tty. > > I've got a patch queued up for 5.12 that clears ->fs and ->files for the > thread if not explicitly inherited, and I'm working on similarly > proactively catching these cases that could potentially be problematic. Well, the /dev/tty case still needs fixing somehow. Opening /dev/tty actually depends on current->signal, and if it is NULL it will fall back on the first VT console instead (I think). I wonder if it should do the same thing /proc/self does.. Linus