Skip to content

Commit

Permalink
powerpc/pseries: Release DRC when configure_connector fails
Browse files Browse the repository at this point in the history
Commit f32393c ("powerpc/pseries: Correct cpu affinity for
dlpar added cpus") moved dlpar_acquire_drc() call to before
dlpar_configure_connector() call in dlpar_cpu_probe(), but missed
to release the DRC if dlpar_configure_connector() failed.
During CPU hotplug, if configure-connector fails for any reason,
then this will result in subsequent CPU hotplug attempts to fail.

Release the acquired DRC if dlpar_configure_connector() call fails
so that the DRC is left in right isolation and allocation state
for the subsequent hotplug operation to succeed.

Fixes: f32393c ("powerpc/pseries: Correct cpu affinity for dlpar added cpus")
Cc: stable@vger.kernel.org # 4.1+
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Bharata B Rao authored and Michael Ellerman committed Sep 8, 2015
1 parent 7d1647d commit daebaab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/powerpc/platforms/pseries/dlpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,10 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count)

dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent);
of_node_put(parent);
if (!dn)
if (!dn) {
dlpar_release_drc(drc_index);
return -EINVAL;
}

rc = dlpar_attach_node(dn);
if (rc) {
Expand Down

0 comments on commit daebaab

Please sign in to comment.