[PATCH v2 04/10] back_trace: don't check /proc if !LOCAL_ACTIVE()

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

 



Obviously the /proc/$tc->pid check can only make sense if LOCAL_ACTIVE().

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
---
 kernel.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel.c b/kernel.c
index a6fa7a6..c82b854 100644
--- a/kernel.c
+++ b/kernel.c
@@ -2901,6 +2901,10 @@ back_trace(struct bt_info *bt)
 	}
 
 	if (ACTIVE() && !INSTACK(esp, bt)) {
+		if (!LOCAL_ACTIVE()) {
+			error(INFO, "task no longer exists\n");
+			return;
+		}
 		sprintf(buf, "/proc/%ld", bt->tc->pid); 
 		if (!file_exists(buf, NULL))
 			error(INFO, "task no longer exists\n");
-- 
2.5.0

--
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