From 6e556b471036b751aaa1a1b5a189eff76b1a2d0b Mon Sep 17 00:00:00 2001 From: Mahesh Salgaonkar Date: Sun, 30 Mar 2014 11:03:23 +0530 Subject: [PATCH] powerpc/book3s: Fix mc_recoverable_range buffer overrun issue. Currently we wrongly allocate mc_recoverable_range buffer (to hold recoverable ranges) based on size of the property "mcheck-recoverable-ranges". This results in allocating less memory to hold available recoverable range entries from /proc/device-tree/ibm,opal/mcheck-recoverable-ranges. This patch fixes this issue by allocating mc_recoverable_range buffer based on number of entries of recoverable ranges instead of device property size. Without this change we end up allocating less memory and run into memory corruption issue. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Benjamin Herrenschmidt --- Reading git-format-patch failed