rdmacg: Fixed uninitialized current resource usage
PATCH 1/1 rdmacg: Fixed uninitialized current resource usage
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 <[email protected]>
--- kernel/cgroup/rdma.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/cgroup/rdma.c +2 -0
@@ -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 )
Signature · 1 line
2.7.4
Tejun Heo
AppliedQuoted 8 lines · Parav Pandit
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 <[email protected]>
Applied to cgroup/for-4.11-rdmacg.
Thanks.
Signature · 1 line
tejun