diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-12-10 08:01:10 -0800 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-12-10 08:01:10 -0800 |
commit | 8eec3ec7b6576a80fbeda89beed8f9f667f9dc7b (patch) | |
tree | d6acbc72ce4f7434374ba895f88fcfcdc85fa46a /fs/proc/array.c | |
parent | 6844488aaa6b23d45106c9c3c3ba2f2ee4a612f9 (diff) | |
parent | cb371265c2f1a0dd0cee03bd7fff413d671c53f0 (diff) |
Merge tag 'v4.1.14' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-linaro-lsk-v4.1
This is the 4.1.14 stable release
# gpg: Signature made Wed Dec 9 11:03:49 2015 PST using RSA key ID 6092693E
# gpg: Good signature from "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>"
* tag 'v4.1.14' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (97 commits)
Linux 4.1.14
netlink: Add missing goto statement to netlink_insert
KVM: s390: enable SIMD only when no VCPUs were created
staging/lustre: use jiffies for lp_last_query times
xhci: Workaround to get Intel xHCI reset working more reliably
tty: Fix tty_send_xchar() lock order inversion
tty: audit: Fix audit source
ALSA: usb-audio: work around CH345 input SysEx corruption
ALSA: usb-audio: prevent CH345 multiport output SysEx corruption
ALSA: usb-audio: add packet size quirk for the Medeli DD305
USB: option: add XS Stick W100-2 from 4G Systems
USB: serial: option: add support for Novatel MiFi USB620L
USB: ti_usb_3410_5052: Add Honeywell HGI80 ID
usb: musb: core: fix order of arguments to ulpi write callback
USB: qcserial: Fix support for HP lt4112 LTE/HSPA+ Gobi 4G Modem
USB: qcserial: Add support for Quectel EC20 Mini PCIe module
usblp: do not set TASK_INTERRUPTIBLE before lock
usb: ehci-orion: fix probe for !GENERIC_PHY
ALSA: usb: Add native DSD support for Aune X1S
usb: chipidea: imx: refine clock operations to adapt for all platforms
...
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index fd02a9ebfc30..70f9c4cba31f 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -364,7 +364,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task, int whole) { - unsigned long vsize, eip, esp, wchan = ~0UL; + unsigned long vsize, eip, esp, wchan = 0; int priority, nice; int tty_pgrp = -1, tty_nr = 0; sigset_t sigign, sigcatch; @@ -496,7 +496,19 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, seq_put_decimal_ull(m, ' ', task->blocked.sig[0] & 0x7fffffffUL); seq_put_decimal_ull(m, ' ', sigign.sig[0] & 0x7fffffffUL); seq_put_decimal_ull(m, ' ', sigcatch.sig[0] & 0x7fffffffUL); - seq_put_decimal_ull(m, ' ', wchan); + + /* + * We used to output the absolute kernel address, but that's an + * information leak - so instead we show a 0/1 flag here, to signal + * to user-space whether there's a wchan field in /proc/PID/wchan. + * + * This works with older implementations of procps as well. + */ + if (wchan) + seq_puts(m, " 1"); + else + seq_puts(m, " 0"); + seq_put_decimal_ull(m, ' ', 0); seq_put_decimal_ull(m, ' ', 0); seq_put_decimal_ll(m, ' ', task->exit_signal); |