diff --git a/fs/file.c b/fs/file.c index 21c0893f2f1d..9d02352fa18c 100644 --- a/fs/file.c +++ b/fs/file.c @@ -834,6 +834,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();