aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/file.h
diff options
context:
space:
mode:
authorKirill Korotaev <dev@sw.ru>2006-09-29 05:00:05 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:12 -0400
commit3b9b8ab65d8eed784b9164d03807cb2bda7b5cd6 (patch)
tree104c7b01768acd7e152cbf66e4868a73804e8af9 /include/linux/file.h
parentfc09561d6392771a392dea55c287de7e849b6b63 (diff)
[PATCH] Fix unserialized task->files changing
Fixed race on put_files_struct on exec with proc. Restoring files on current on error path may lead to proc having a pointer to already kfree-d files_struct. ->files changing at exit.c and khtread.c are safe as exit_files() makes all things under lock. Found during OpenVZ stress testing. [akpm@osdl.org: add export] Signed-off-by: Pavel Emelianov <xemul@openvz.org> Signed-off-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/file.h')
-rw-r--r--include/linux/file.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/file.h b/include/linux/file.h
index 9f7c2513866f..74183e6f7f45 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -112,5 +112,6 @@ struct task_struct;
112 112
113struct files_struct *get_files_struct(struct task_struct *); 113struct files_struct *get_files_struct(struct task_struct *);
114void FASTCALL(put_files_struct(struct files_struct *fs)); 114void FASTCALL(put_files_struct(struct files_struct *fs));
115void reset_files_struct(struct task_struct *, struct files_struct *);
115 116
116#endif /* __LINUX_FILE_H */ 117#endif /* __LINUX_FILE_H */