[PATCH FIX] powerpc/pseries: Release DRC when configure_connector fails

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE4021d

4 messages, 4 authors, 2015-09-07 · open the first message on its own page

[PATCH FIX] powerpc/pseries: Release DRC when configure_connector fails

From: Bharata B Rao <hidden>
Date: 2015-09-04 10:04:41

From: Bharata B Rao <redacted>

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

Signed-off-by: Bharata B Rao <redacted>
Cc: Nathan Fontenot <redacted>
---
 arch/powerpc/platforms/pseries/dlpar.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 47d9cebe..db17827 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -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) {
-- 
1.8.3.1

Re: [PATCH FIX] powerpc/pseries: Release DRC when configure_connector fails

From: Nathan Fontenot <hidden>
Date: 2015-09-04 14:43:48

On 09/04/2015 05:04 AM, Bharata B Rao wrote:
From: Bharata B Rao <redacted>

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

Signed-off-by: Bharata B Rao <redacted>
Cc: Nathan Fontenot <redacted>
Reviewed-by: Nathan Fontenot <redacted>
quoted hunk
---
 arch/powerpc/platforms/pseries/dlpar.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 47d9cebe..db17827 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -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) {

Re: [FIX] powerpc/pseries: Release DRC when configure_connector fails

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-09-07 09:22:04

On Fri, 2015-04-09 at 10:04:12 UTC, Bharata B Rao wrote:
From: Bharata B Rao <redacted>

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

Signed-off-by: Bharata B Rao <redacted>
Cc: Nathan Fontenot <redacted>
Reviewed-by: Nathan Fontenot <redacted>
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

Re: [FIX] powerpc/pseries: Release DRC when configure_connector fails

From: Bharata B Rao <hidden>
Date: 2015-09-07 10:24:34

On Mon, Sep 07, 2015 at 07:22:04PM +1000, Michael Ellerman wrote:
On Fri, 2015-04-09 at 10:04:12 UTC, Bharata B Rao wrote:
quoted
From: Bharata B Rao <redacted>

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

Signed-off-by: Bharata B Rao <redacted>
Cc: Nathan Fontenot <redacted>
Reviewed-by: Nathan Fontenot <redacted>
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help