diff options
| author | Alexander Viro <viro@math.psu.edu> | 2002-02-12 20:31:17 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-02-12 20:31:17 -0800 |
| commit | 24b10ca2e75b72716df5d00f93e14dd32c12670e (patch) | |
| tree | 2e270802331865b4df78bdb84dad8c6ee8aa5f5d /fs/proc/base.c | |
| parent | 6441b29ed3d6f50a2bd53581370dea0fada40601 (diff) | |
[PATCH] misc fixes
1) proc/<pid>/fd readdir() has broken locking - sometimes it ends up with
task->files->file_lock locked.
2) missing variable definition in arch/s390x/kernel/linux32.c::cp_new_stat32().
Please, apply - the first one is really serious.
Diffstat (limited to 'fs/proc/base.c')
| -rw-r--r-- | fs/proc/base.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 353d5cc926fb..c8ba919af768 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -623,8 +623,10 @@ static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) } while (i); ino = fake_ino(pid, PROC_PID_FD_DIR + fd); - if (filldir(dirent, buf+j, NUMBUF-j, fd+2, ino, DT_LNK) < 0) + if (filldir(dirent, buf+j, NUMBUF-j, fd+2, ino, DT_LNK) < 0) { + read_lock(&files->file_lock); break; + } read_lock(&files->file_lock); } read_unlock(&files->file_lock); |
