Re: [syzbot] [kernel?] KCSAN: data-race in __fput / __tty_hangup (4)

From: Tetsuo Handa
Date: Fri Apr 21 2023 - 12:02:37 EST


On 2023/04/22 0:12, Tetsuo Handa wrote:
> __fput(file) is called when the last reference to file is released.
> Since __tty_hangup() traverses tty->tty_files under tty->files_lock,
> tty_add_file() needs to hold a ref before adding to tty->tty_files
> in order to defer concurrent __fput() by other threads?

Hmm, this did not work; get_file() prevents tty_release().