Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328981
b: refs/heads/master
c: 179e037
h: refs/heads/master
i:
  328979: 349d9fd
v: v3
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 524436d commit 70983a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3c073f808b22dfae15ef8412b6f7b998644139a
refs/heads/master: 179e037fc1370288188cb1f90b81156d75a3cb2d
7 changes: 7 additions & 0 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2066,6 +2066,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
int retval = 0;
int flag = 0;
int ispipe;
struct files_struct *displaced;
bool need_nonrelative = false;
static atomic_t core_dump_count = ATOMIC_INIT(0);
struct coredump_params cprm = {
Expand Down Expand Up @@ -2219,6 +2220,12 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
goto close_fail;
}

/* get us an unshared descriptor table; almost always a no-op */
retval = unshare_files(&displaced);
if (retval)
goto close_fail;
if (displaced)
put_files_struct(displaced);
retval = binfmt->core_dump(&cprm);
if (retval)
current->signal->group_exit_code |= 0x80;
Expand Down

0 comments on commit 70983a5

Please sign in to comment.