[Crash-utility] [PATCH] fix "ps -l"
vinayak menon
vinayakm.list at gmail.com
Fri Nov 3 10:56:17 UTC 2017
fix segfault when executing "ps -l".
Signed-off-by: Vinayak Menon <vinayakm.list at gmail.com>
---
task.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/task.c b/task.c
index 5754159..f2628b7 100644
--- a/task.c
+++ b/task.c
@@ -3485,7 +3485,7 @@ show_last_run(struct task_context *tc, struct psinfo *psi)
sprintf(format, "[%c%dll%c] ", '%', c,
pc->output_radix == 10 ? 'u' : 'x');
- if (psi) {
+ if (psi && psi->cpus) {
for (c = others = 0; c < kt->cpus; c++) {
if (!NUM_IN_BITMAP(psi->cpus, c))
continue;
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-ps-l.patch
Type: application/octet-stream
Size: 735 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20171103/17885f04/attachment.obj>
More information about the Crash-utility
mailing list