]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitad1c0b23163fcc43e04f0b86f9fd67ad96473a0a
tree5033fedf49cd107350af516effdfec2aeb6908b4
parent04db378bc38419431c40af65242beb366dba35ea
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