diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 18:11:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 18:11:48 -0700 |
commit | ecb2ecd9c241de16ebb31b7dc441dbbfc0f6006e (patch) | |
tree | c55b5cdf7a993e303f1f85b270e0e512f526fdd5 /fs | |
parent | afe594c79138ba6125b195a0b01fd28c34e3a993 (diff) | |
parent | c54d0dc35324300cdc502137f5c0ee44f53d7a8b (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro:
"Fix for my braino in replace_fd(), dhowell's fix for the fallout from
over-enthusiastic bo^Wdeclaration movements plus crapectomy that
should've happened a long time ago (SEL_... definitions)."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
bury SEL_{IN,OUT,EX}
Unexport some bits of linux/fs.h
fix a leak in replace_fd() users
Diffstat (limited to 'fs')
-rw-r--r-- | fs/coredump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/coredump.c b/fs/coredump.c index fd37facac8d..ce47379bfa6 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -450,11 +450,12 @@ static int umh_pipe_setup(struct subprocess_info *info, struct cred *new) cp->file = files[1]; - replace_fd(0, files[0], 0); + err = replace_fd(0, files[0], 0); + fput(files[0]); /* and disallow core files too */ current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; - return 0; + return err; } void do_coredump(siginfo_t *siginfo, struct pt_regs *regs) |