diff --git a/fs/file.c b/fs/file.c index ec6738ed907d..9a6a3bba53af 100644 --- a/fs/file.c +++ b/fs/file.c @@ -694,6 +694,10 @@ loop: file = NULL; else if (!get_file_rcu_many(file, refs)) goto loop; + else if (__fcheck_files(files, fd) != file) { + fput_many(file, refs); + goto loop; + } } rcu_read_unlock();