Skip to contentSkip to conversation

powerpc/pseries: Release DRC when configure_connector fails

PATCH In review Bharata B Rao 4 participants 4 messages Sep 4, 2015 – Sep 7, 2015 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/pseries: Release DRC when configure_connector fails

From: Bharata B Rao <[email protected]>

dlpar_cpu_probe() should release the acquired DRC if configure_connector call fails.

Cc Nathan Fontenot <[email protected]>
---
 arch/powerpc/platforms/pseries/dlpar.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/dlpar.c +3 -1
index 47d9cebe..db17827 100644
@@ -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) {
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Bharata B Rao

From: Bharata B Rao <[email protected]>

dlpar_cpu_probe() should release the acquired DRC if configure_connector call fails.

Cc Nathan Fontenot <[email protected]>
Quoted 21 lines
---
 arch/powerpc/platforms/pseries/dlpar.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/dlpar.c +3 -1
index 47d9cebe..db17827 100644
@@ -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) {
#2 lore raw
In reply to Bharata B Rao
Quoted 8 lines · Bharata B Rao

From: Bharata B Rao <[email protected]>

dlpar_cpu_probe() should release the acquired DRC if configure_connector call fails.

Which commit caused this to be a bug? Or has it always been there?

What is the symptom, is it catastrophic, or just cosmetic?

Should the fix go to stable?

cheers

#3 lore raw
Quoted 10 lines · Michael Ellerman
Quoted 8 lines · Bharata B Rao

From: Bharata B Rao <[email protected]>

dlpar_cpu_probe() should release the acquired DRC if configure_connector call fails.

Quoted 5 lines

Which commit caused this to be a bug? Or has it always been there?

What is the symptom, is it catastrophic, or just cosmetic?

Should the fix go to stable?

Posted v1 with the above questions answered appropriately.

Regards,
Bharata.