powernv-cpuidle: Validate DT property array size
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Wed, 15 Mar 2017 08:15:53 +0000 (13:45 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Mar 2017 22:14:00 +0000 (00:14 +0200)
commitecad4502d090a8630f50a88cbe072b92f3a3229e
tree5033fedf49cd107350af516effdfec2aeb6908b4
parentc02ed2e75ef4c74e41e421acb4ef1494671585e8
powernv-cpuidle: Validate DT property array size

The various properties associated with powernv idle states such as
names, flags, residency-ns, latencies-ns, psscr, psscr-mask are
exposed in the device-tree as property arrays such the pointwise
entries in each of these arrays correspond to the properties of the
same idle state.

This patch validates that the lengths of the property arrays are the
same. If there is a mismatch, the patch will ensure that we bail out
and not expose the platform idle states via cpuidle.

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Reviewed-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle-powernv.c