[Skiboot] [PATCH 03/11] xive: Fix recursive locking bug in opal_xive_reset()
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Mar 15 20:58:52 AEDT 2017
The re-initialization of the per-CPU data structures must be done
without holding the xive lock as it will be taken when needed by
the functions being called.
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
hw/xive.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/xive.c b/hw/xive.c
index 6553e9b..bb20cb7 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -3838,6 +3838,9 @@ static void xive_reset_one(struct xive *x)
buddy_reset(x->vp_buddy);
#endif
+ /* The rest must not be called with the lock held */
+ unlock(&x->lock);
+
/* Re-configure the CPUs */
for_each_present_cpu(c) {
struct xive_cpu_state *xs = c->xstate;
@@ -3856,8 +3859,6 @@ static void xive_reset_one(struct xive *x)
xive_ipi_init(x, c);
}
}
-
- unlock(&x->lock);
}
static int64_t opal_xive_reset(uint64_t version)
--
2.9.3
More information about the Skiboot
mailing list