[PATCH] fix "ps -l"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fix segfault when executing "ps -l".

Signed-off-by: Vinayak Menon <vinayakm.list@xxxxxxxxx>
---
 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;
--

Attachment: 0001-fix-ps-l.patch
Description: Binary data

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux