[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>
This commit is contained in:
parent
af4e5a218e
commit
4fb3a53860
5 changed files with 20 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue