Skip to content

Commit

Permalink
rdmacg: Fixed uninitialized current resource usage
Browse files Browse the repository at this point in the history
Fixed warning reported by kbuild test robot.
When reading current resource usage value, when no resources are
allocated, its possible that it can report a uninitialized value
for current resource usage.
This fix avoids it by initializing it to zero as no resource is
allocated.

Signed-off-by: Parav Pandit <pandit.parav@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Parav Pandit authored and Tejun Heo committed Jan 10, 2017
1 parent 9c1e67f commit 7896dfb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/cgroup/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ static void print_rpool_values(struct seq_file *sf,
} else {
if (rpool)
value = rpool->resources[i].usage;
else
value = 0;
}

if (value == S32_MAX)
Expand Down

0 comments on commit 7896dfb

Please sign in to comment.