Use proc_pid_ns() to get pid_namespace from the proc superblock