Skip to content

Commit

Permalink
fix(sinsp): invalid threads shoudln't be in a pid namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <[email protected]>
  • Loading branch information
Andreagit97 committed Jun 20, 2024
1 parent 3c1264c commit 1bd5782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userspace/libsinsp/threadinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/*!
Expand Down

0 comments on commit 1bd5782

Please sign in to comment.