From: Pekka Enberg We should do fput only to files that were not used by the revoke operation. Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton --- fs/revoke.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff -puN fs/revoke.c~revoke-core-code-only-fput-unused-files fs/revoke.c --- a/fs/revoke.c~revoke-core-code-only-fput-unused-files +++ a/fs/revoke.c @@ -130,7 +130,6 @@ static int revoke_fds(struct task_struct } new_filp = revoke_table_get(table); - get_file(new_filp); /* * Replace original struct file pointer with a pointer to @@ -487,7 +486,7 @@ static void free_revoke_table(struct rev { int i; - for (i = 0; i < table->size; i++) + for (i = table->end; i < table->size; i++) fput(table->files[i]); kfree(table->files); _