diff options
Diffstat (limited to 'rdma/stat.c')
-rw-r--r-- | rdma/stat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rdma/stat.c b/rdma/stat.c index c7da29225..ab0629155 100644 --- a/rdma/stat.c +++ b/rdma/stat.c @@ -248,8 +248,11 @@ static int res_counter_line(struct rd *rd, const char *name, int index, return MNL_CB_OK; if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { + SPRINT_BUF(b); + pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - comm = get_task_name(pid); + if (!get_task_name(pid, b, sizeof(b))) + comm = b; } if (rd_is_filtered_attr(rd, "pid", pid, nla_line[RDMA_NLDEV_ATTR_RES_PID])) |