diff options
| author | James Morris <[email protected]> | 2018-02-21 08:21:41 -0800 |
|---|---|---|
| committer | James Morris <[email protected]> | 2018-02-21 08:21:41 -0800 |
| commit | a02633e9b13dcb9b1a656b08f81bc8ba2d4d2294 (patch) | |
| tree | 3d5ef56eee3117cd61812759a255fa293d8044b8 /fs/proc/array.c | |
| parent | d21bd6898336a7892914d308d5e0868f0b863571 (diff) | |
| parent | 91ab883eb21325ad80f3473633f794c78ac87f51 (diff) | |
Merge tag 'v4.16-rc2' into next-general
Sync to Linux 4.16-rc2 for developers to work against.
Diffstat (limited to 'fs/proc/array.c')
| -rw-r--r-- | fs/proc/array.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 79375fc115d2..598803576e4c 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -430,8 +430,11 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, * safe because the task has stopped executing permanently. */ if (permitted && (task->flags & PF_DUMPCORE)) { - eip = KSTK_EIP(task); - esp = KSTK_ESP(task); + if (try_get_task_stack(task)) { + eip = KSTK_EIP(task); + esp = KSTK_ESP(task); + put_task_stack(task); + } } } @@ -733,16 +736,10 @@ static int children_seq_open(struct inode *inode, struct file *file) return ret; } -int children_seq_release(struct inode *inode, struct file *file) -{ - seq_release(inode, file); - return 0; -} - const struct file_operations proc_tid_children_operations = { .open = children_seq_open, .read = seq_read, .llseek = seq_lseek, - .release = children_seq_release, + .release = seq_release, }; #endif /* CONFIG_PROC_CHILDREN */ |