diff --git a/fs/file.c b/fs/file.c index e5d328335f88..09cefc944f86 100644 --- a/fs/file.c +++ b/fs/file.c @@ -723,6 +723,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();