diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-03-15 20:58:52 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-03-16 17:18:01 +1100 |
commit | 1d16851e342ffa0d341609a64f7cc991690d092e (patch) | |
tree | d07b3cfe3dae1d57ab4d6bedee6cbf1e5abcd226 | |
parent | 7980f5e49b4e43152b02cb60ba4742b10839c3f4 (diff) | |
download | skiboot-1d16851e342ffa0d341609a64f7cc991690d092e.zip skiboot-1d16851e342ffa0d341609a64f7cc991690d092e.tar.gz skiboot-1d16851e342ffa0d341609a64f7cc991690d092e.tar.bz2 |
xive: Fix recursive locking bug in opal_xive_reset()
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@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/xive.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |