diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-19 10:56:18 -0800 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-19 10:56:18 -0800 | 
| commit | d342740e26704d94e2ab0a3ea0e04c506b7fbfca (patch) | |
| tree | fdb8156f7d0bff35919dd8fba2edaea0701e9d79 /fs/proc/array.c | |
| parent | 4b664e739f7743f91e1d12ebfb7a76307ebea702 (diff) | |
| parent | a3d6c976f71902388e444594daa902032b5a45fa (diff) | |
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
 "6 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  sparse doesn't support struct randomization
  proc: fix coredump vs read /proc/*/stat race
  scripts/gdb/linux/tasks.py: fix get_thread_info
  scripts/decodecode: fix decoding for AArch64 (arm64) instructions
  mm/page_owner.c: remove drain_all_pages from init_early_allocated_pages
  mm/memory.c: release locked page in do_swap_page()
Diffstat (limited to 'fs/proc/array.c')
| -rw-r--r-- | fs/proc/array.c | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 79375fc115d2..d67a72dcb92c 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); +			}  		}  	}  | 
