diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-12-17 08:48:38 -0800 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-12-17 08:48:38 -0800 |
commit | 906d9eadd3b6698fa6ceb9bcdf41da6aa56d0a24 (patch) | |
tree | b258d06410e154ce58d9b0d16ffba0834ff2a1ac /fs/proc/base.c | |
parent | d3d3a134d75d28034b950bc0b6682ba0be976f37 (diff) | |
parent | 9f41e6b222c4a04c7b46068df82842a6188b4a57 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-16.01-rtlsk-v4.1-15.12-rt
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 093ca14f5701..fcdeb1eb3921 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -238,13 +238,10 @@ static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns, wchan = get_wchan(task); - if (lookup_symbol_name(wchan, symname) < 0) { - if (!ptrace_may_access(task, PTRACE_MODE_READ)) - return 0; - seq_printf(m, "%lu", wchan); - } else { + if (wchan && ptrace_may_access(task, PTRACE_MODE_READ) && !lookup_symbol_name(wchan, symname)) seq_printf(m, "%s", symname); - } + else + seq_putc(m, '0'); return 0; } |