summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDipankar Sarma <dipankar@in.ibm.com>2005-09-16 19:28:13 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 11:50:02 -0700
commit4fb3a53860cee2aaaf81186c451b7da0b95b45c1 (patch)
treedb66ba7d3886644729707586aed781c445e12c16 /kernel
parentaf4e5a218e18ad588d60a4f9d6f8fb5db1a32587 (diff)
downloadkernel-crypto-4fb3a53860cee2aaaf81186c451b7da0b95b45c1.tar.gz
kernel-crypto-4fb3a53860cee2aaaf81186c451b7da0b95b45c1.tar.xz
kernel-crypto-4fb3a53860cee2aaaf81186c451b7da0b95b45c1.zip
[PATCH] files: fix preemption issues
With the new fdtable locking rules, you have to protect fdtable with either ->file_lock or rcu_read_lock/unlock(). There are some places where we aren't doing either. This patch fixes those places. Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 6d2089a1bce..ee6d8b8abef 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -371,6 +371,12 @@ static inline void close_files(struct files_struct * files)
struct fdtable *fdt;
j = 0;
+
+ /*
+ * It is safe to dereference the fd table without RCU or
+ * ->file_lock because this is the last reference to the
+ * files structure.
+ */
fdt = files_fdtable(files);
for (;;) {
unsigned long set;