From 1bd57821d56125e7ac6e3324673df41a0399383d Mon Sep 17 00:00:00 2001 From: Andrea Terzolo Date: Thu, 20 Jun 2024 11:07:05 +0200 Subject: [PATCH] fix(sinsp): invalid threads shoudln't be in a pid namespace Signed-off-by: Andrea Terzolo --- userspace/libsinsp/threadinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/libsinsp/threadinfo.h b/userspace/libsinsp/threadinfo.h index 4da7e655ad..4677525b2b 100644 --- a/userspace/libsinsp/threadinfo.h +++ b/userspace/libsinsp/threadinfo.h @@ -198,7 +198,7 @@ class SINSP_PUBLIC sinsp_threadinfo : public libsinsp::state::table_entry */ inline bool is_in_pid_namespace() const { - return (m_flags & PPM_CL_CHILD_IN_PIDNS || m_tid != m_vtid); + return (m_flags & PPM_CL_CHILD_IN_PIDNS || (m_tid != m_vtid && m_vtid >= 0)); } /*!