summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/s390x/kernel/linux32.c4
-rw-r--r--fs/proc/base.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/s390x/kernel/linux32.c b/arch/s390x/kernel/linux32.c
index 883ed691499b..a125f2d41043 100644
--- a/arch/s390x/kernel/linux32.c
+++ b/arch/s390x/kernel/linux32.c
@@ -1473,7 +1473,9 @@ out_nofds:
static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
{
- err = put_user(stat->dev, &statbuf->st_dev);
+ int err;
+
+ err = put_user(stat->dev, &statbuf->st_dev);
err |= put_user(stat->ino, &statbuf->st_ino);
err |= put_user(stat->mode, &statbuf->st_mode);
err |= put_user(stat->nlink, &statbuf->st_nlink);
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);