Skip to contentSkip to conversation

rdmacg: Fixed uninitialized current resource usage

PATCH Applied Parav Pandit 2 participants 2 messages Jan 10, 2017 1 message not in the archive cgroup

lore
Share & tools
lore
#0 lore raw

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.

---
 kernel/cgroup/rdma.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/cgroup/rdma.c +2 -0
index 021bee7..defad3c 100644
@@ -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
Applied
#2 lore raw
In reply to a message not in the archive
Quoted 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.

Applied to cgroup/for-4.11-rdmacg.

Thanks.

Signature · 1 line
tejun