From: Markus Elfring <hidden> Date: 2023-03-17 08:52:05
Date: Fri, 17 Mar 2023 09:26:13 +0100
The label “out_err” was used to jump to another pointer check despite of
the detail in the implementation of the function “pSeries_reconfig_add_node”
that it was determined already that the corresponding variable contained
a null pointer (because of a failed function call in two cases).
1. Thus return directly after a call of the function “kzalloc” failed.
2. Use more appropriate labels instead.
3. Delete a redundant check.
4. Omit an explicit initialisation for the local variable “err”.
This issue was detected by using the Coccinelle software.
Fixes: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac ("Linux-2.6.12-rc2")
Signed-off-by: Markus Elfring <redacted>
---
arch/powerpc/platforms/pseries/reconfig.c | 26 ++++++++++++-----------
1 file changed, 14 insertions(+), 12 deletions(-)
The label “out_err” was used to jump to another pointer check despite of
the detail in the implementation of the function “pSeries_reconfig_add_node”
that it was determined already that the corresponding variable contained
a null pointer (because of a failed function call in two cases).
1. Thus return directly after a call of the function “kzalloc” failed.
2. Use more appropriate labels instead.
3. Delete a redundant check.
4. Omit an explicit initialisation for the local variable “err”.
This issue was detected by using the Coccinelle software.
Is there a correctness or safety issue here? The subject uses the word
"fix" but the commit message doesn't seem to identify one.
Can you share how Coccinelle is being invoked and its output?
From: Markus Elfring <hidden> Date: 2023-03-17 14:27:00
quoted
The label “out_err” was used to jump to another pointer check despite of
the detail in the implementation of the function “pSeries_reconfig_add_node”
that it was determined already that the corresponding variable contained
a null pointer (because of a failed function call in two cases).
1. Thus return directly after a call of the function “kzalloc” failed.
2. Use more appropriate labels instead.
3. Delete a redundant check.
4. Omit an explicit initialisation for the local variable “err”.
This issue was detected by using the Coccinelle software.
Is there a correctness or safety issue here?
I got the impression that the application of only a single label like “out_err”
resulted in improvable implementation details.
The subject uses the word "fix" but the commit message doesn't seem to identify one.
Can you find the proposed adjustments reasonable?
Can you share how Coccinelle is being invoked and its output?
The label “out_err” was used to jump to another pointer check despite of
the detail in the implementation of the function “pSeries_reconfig_add_node”
that it was determined already that the corresponding variable contained
a null pointer (because of a failed function call in two cases).
1. Thus return directly after a call of the function “kzalloc” failed.
2. Use more appropriate labels instead.
3. Delete a redundant check.
4. Omit an explicit initialisation for the local variable “err”.
This issue was detected by using the Coccinelle software.
Is there a correctness or safety issue here?
I got the impression that the application of only a single label like “out_err”
resulted in improvable implementation details.
I don't understand what you're trying to say here. It doesn't seem to
answer my question.
quoted
The subject uses the word "fix" but the commit message doesn't seem to identify one.
Can you find the proposed adjustments reasonable?
In the absence of a bug fix or an improvement in readability, not
really, sorry. It adds to the function more goto labels and another
return, apparently to avoid checks that are sometimes redundant (but not
incorrect) at the C source code level. An optimizing compiler doesn't
necessarily arrange the generated code in the same way.
quoted
Can you share how Coccinelle is being invoked and its output?
From: Markus Elfring <hidden> Date: 2023-03-18 07:32:02
quoted
quoted
quoted
The label “out_err” was used to jump to another pointer check despite of
the detail in the implementation of the function “pSeries_reconfig_add_node”
that it was determined already that the corresponding variable contained
a null pointer (because of a failed function call in two cases).
1. Thus return directly after a call of the function “kzalloc” failed.
2. Use more appropriate labels instead.
3. Delete a redundant check.
4. Omit an explicit initialisation for the local variable “err”.
This issue was detected by using the Coccinelle software.
Is there a correctness or safety issue here?
I got the impression that the application of only a single label like “out_err”
resulted in improvable implementation details.
I don't understand what you're trying to say here.
What does hinder you to understand the presented change description better
at the moment?
It doesn't seem to answer my question.
I hope that my answer will trigger further helpful considerations.
quoted
quoted
The subject uses the word "fix" but the commit message doesn't seem to identify one.
Can you find the proposed adjustments reasonable?
In the absence of a bug fix or an improvement in readability, not really, sorry.
The views are varying for “programming bugs”, aren't they?
It adds to the function more goto labels and another return,
This is the suggested source code transformation.
apparently to avoid checks
Can the support grow for such a programming goal?
that are sometimes redundant
Can such implementation details become undesirable?
(but not incorrect) at the C source code level.
Will this aspect affect further development concerns?
The label “out_err” was used to jump to another pointer check despite of
the detail in the implementation of the function “pSeries_reconfig_add_node”
that it was determined already that the corresponding variable contained
a null pointer (because of a failed function call in two cases).
1. Thus return directly after a call of the function “kzalloc” failed.
2. Use more appropriate labels instead.
3. Delete a redundant check.
4. Omit an explicit initialisation for the local variable “err”.
This issue was detected by using the Coccinelle software.
Is there a correctness or safety issue here?
I got the impression that the application of only a single label like “out_err”
resulted in improvable implementation details.
I don't understand what you're trying to say here.
What does hinder you to understand the presented change description better
at the moment?
quoted
It doesn't seem to answer my question.
I hope that my answer will trigger further helpful considerations.
I don't consider this response constructive, but I want to get this back
on track. It's been brought to my attention that there is in fact a
crash bug in this function's error path:
np->parent = pseries_of_derive_parent(path);
if (IS_ERR(np->parent)) {
err = PTR_ERR(np->parent);
goto out_err;
}
...
out_err:
if (np) {
of_node_put(np->parent);
np->parent can be an encoded error value, we don't want to of_node_put()
that.
I believe the patch as written happens to fix the issue. Will you please
write it up as a bug fix and resubmit?
From: Markus Elfring <hidden> Date: 2023-03-21 10:32:22
Date: Tue, 21 Mar 2023 11:26:32 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Do not pass an error pointer to of_node_put()
Fix exception handling
arch/powerpc/platforms/pseries/reconfig.c | 26 ++++++++++++-----------
1 file changed, 14 insertions(+), 12 deletions(-)
--
2.40.0
From: Markus Elfring <hidden> Date: 2023-03-21 10:36:14
Date: Tue, 21 Mar 2023 10:30:23 +0100
It can be determined in the implementation of the function
“pSeries_reconfig_add_node” that an error code would occasionally
be provided by a call of a function like pseries_of_derive_parent().
This error indication was passed to an of_node_put() call according to
an attempt for exception handling so far.
Thus fix the risk for undesirable software behaviour by using
an additional label for this error case.
Link: https://lists.ozlabs.org/pipermail/linuxppc-dev/2023-March/256025.html
Link: https://lore.kernel.org/lkml/87pm9377qt.fsf@linux.ibm.com/
Reported-by: Nathan Lynch <redacted>
Fixes: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 ("Linux-2.6.12-rc2")
Signed-off-by: Markus Elfring <redacted>
---
V2:
This update step was added according to another change request.
arch/powerpc/platforms/pseries/reconfig.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Markus Elfring <hidden> Date: 2023-03-21 10:38:03
Date: Tue, 21 Mar 2023 10:50:08 +0100
The label “out_err” was used to jump to another pointer check despite of
the detail in the implementation of the function “pSeries_reconfig_add_node”
that it was determined already that the corresponding variable contained
a null pointer (because of a failed function call in two cases).
1. Thus return directly after a call of the function “kzalloc” failed.
2. Use more appropriate labels instead.
3. Delete a redundant check.
4. Omit an explicit initialisation for the local variable “err”.
This issue was detected by using the Coccinelle software.
Fixes: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 ("Linux-2.6.12-rc2")
Signed-off-by: Markus Elfring <redacted>
---
V2:
This update step was based on a previous change.
arch/powerpc/platforms/pseries/reconfig.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
From: Markus Elfring <hidden> Date: 2023-03-25 13:41:40
Date: Tue, 21 Mar 2023 11:26:32 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Do not pass an error pointer to of_node_put()
Fix exception handling
arch/powerpc/platforms/pseries/reconfig.c | 26 ++++++++++++-----------
1 file changed, 14 insertions(+), 12 deletions(-)
--
2.40.0
From: Markus Elfring <hidden> Date: 2023-03-25 13:43:46
Date: Tue, 21 Mar 2023 10:30:23 +0100
It can be determined in the implementation of the function
“pSeries_reconfig_add_node” that an error code would occasionally
be provided by a call of a function like pseries_of_derive_parent().
This error indication was passed to an of_node_put() call according to
an attempt for exception handling so far.
Thus fix the risk for undesirable software behaviour by using
an additional label for this error case.
Link: https://lists.ozlabs.org/pipermail/linuxppc-dev/2023-March/256025.html
Link: https://lore.kernel.org/lkml/87pm9377qt.fsf@linux.ibm.com/
Reported-by: Nathan Lynch <redacted>
Fixes: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 ("Linux-2.6.12-rc2")
Signed-off-by: Markus Elfring <redacted>
---
V2:
This update step was added according to another change request.
arch/powerpc/platforms/pseries/reconfig.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Markus Elfring <hidden> Date: 2023-03-25 13:45:37
Date: Tue, 21 Mar 2023 10:50:08 +0100
The label “out_err” was used to jump to another pointer check despite of
the detail in the implementation of the function “pSeries_reconfig_add_node”
that it was determined already that the corresponding variable contained
a null pointer (because of a failed function call in two cases).
1. Thus return directly after a call of the function “kzalloc” failed.
2. Use more appropriate labels instead.
3. Delete a redundant check.
4. Omit an explicit initialisation for the local variable “err”.
This issue was detected by using the Coccinelle software.
Fixes: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 ("Linux-2.6.12-rc2")
Signed-off-by: Markus Elfring <redacted>
---
V2:
This update step was based on a previous change.
arch/powerpc/platforms/pseries/reconfig.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
From: Markus Elfring <hidden> Date: 2024-01-05 17:19:28
Date: Tue, 21 Mar 2023 11:26:32 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Do not pass an error pointer to of_node_put()
Fix exception handling
arch/powerpc/platforms/pseries/reconfig.c | 26 ++++++++++++-----------
1 file changed, 14 insertions(+), 12 deletions(-)
Is this patch series still in review queues?
Regards,
Markus
From: Markus Elfring <hidden> Date: 2024-10-03 17:05:31
Date: Tue, 21 Mar 2023 10:30:23 +0100
It can be determined in the implementation of the function
“pSeries_reconfig_add_node” that an error code would occasionally
be provided by a call of a function like pseries_of_derive_parent().
This error indication was passed to an of_node_put() call according to
an attempt for exception handling so far.
…
I was notified also about the following adjustment.
…
* linuxppc-dev: [resent,v2,1/2] powerpc/pseries: Do not pass an error pointer to of_node_put() in pSeries_reconfig_add_node()
- http://patchwork.ozlabs.org/project/linuxppc-dev/patch/f5ac19db-c7d5-9a94-aa37-9bb448fe665f@web.de/
- for: Linux PPC development
was: New
now: Changes Requested
…
It seems that I can not see so far why this status update happened
for any reasons.
Will further clarifications become helpful here?
Regards,
Markus
Date: Tue, 21 Mar 2023 10:30:23 +0100
It can be determined in the implementation of the function
“pSeries_reconfig_add_node” that an error code would occasionally
be provided by a call of a function like pseries_of_derive_parent().
This error indication was passed to an of_node_put() call according to
an attempt for exception handling so far.
Sorry I forgot to send the email. It is the same kind of problem as the
other series: Message IDs and/or In-Reply-To headers are messed up and
b4 ends up applying an unrelated patch instead of applying the series as
you can see below:
$ b4 shazam f5ac19db-c7d5-9a94-aa37-9bb448fe665f@web.de
Grabbing thread from
lore.kernel.org/all/f5ac19db-c7d5-9a94-aa37-9bb448fe665f@web.de/t.mbox.gz
Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 128 messages in the thread
WARNING: duplicate messages found at index 1
Subject 1: powerpc/pseries: Do not pass an error pointer to
of_node_put() in pSeries_reconfig_add_node()
Subject 2: powerpc/pseries: Do not pass an error pointer to
of_node_put() in pSeries_reconfig_add_node()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 2
Subject 1: powerpc/pseries: Fix exception handling in
pSeries_reconfig_add_node()
Subject 2: powerpc/pseries: Do not pass an error pointer to
of_node_put() in pSeries_reconfig_add_node()
2 is not a reply... assume additional patch
Assuming new revision: v3 ([PATCH] ipvs: Fix exception handling in two
functions)
Assuming new revision: v4 ([PATCH] selftests: cgroup: Fix exception
handling in test_memcg_oom_group_score_events())
Assuming new revision: v5 ([Nouveau] [PATCH] drm/nouveau: Add a jump
label in nouveau_gem_ioctl_pushbuf())
Assuming new revision: v6 ([PATCH] mm/mempolicy: Fix exception handling
in shared_policy_replace())
Assuming new revision: v7 ([PATCH] firmware: ti_sci: Fix exception
handling in ti_sci_probe())
Assuming new revision: v8 ([PATCH] remoteproc: imx_dsp_rproc: Improve
exception handling in imx_dsp_rproc_mbox_alloc())
Assuming new revision: v9 ([PATCH] spi: atmel: Improve exception
handling in atmel_spi_configure_dma())
Assuming new revision: v10 ([cocci] [PATCH] btrfs: Fix exception
handling in relocating_repair_kthread())
Assuming new revision: v11 ([cocci] [PATCH] ufs: Fix exception handling
in ufs_fill_super())
Assuming new revision: v12 ([cocci] [PATCH] perf cputopo: Improve
exception handling in build_cpu_topology())
Assuming new revision: v13 ([cocci] [PATCH] perf pmu: Improve exception
handling in pmu_lookup())
Assuming new revision: v14 ([cocci] [PATCH] selftests/bpf: Improve
exception handling in rbtree_add_and_remove())
Assuming new revision: v15 ([cocci] [PATCH resent] btrfs: Fix exception
handling in relocating_repair_kthread())
Assuming new revision: v16 ([cocci] [PATCH resent] ufs: Fix exception
handling in ufs_fill_super())
Assuming new revision: v17 ([cocci] [PATCH resent] perf cputopo: Improve
exception handling in build_cpu_topology())
WARNING: duplicate messages found at index 1
Subject 1: scsi: message: fusion: Return directly after input data
validation failed in four functions
Subject 2: powerpc/pseries: Fix exception handling in
pSeries_reconfig_add_node()
2 is a reply... replacing existing: powerpc/pseries: Fix exception
handling in pSeries_reconfig_add_node()
WARNING: duplicate messages found at index 1
Subject 1: md/raid1: Fix exception handling in setup_conf()
Subject 2: scsi: message: fusion: Return directly after input data
validation failed in four functions
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 2
Subject 1: md/raid10: Fix exception handling in setup_conf()
Subject 2: scsi: message: fusion: Return directly after input data
validation failed in four functions
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 1
Subject 1: irqchip/gic-v4: Fix exception handling in
its_alloc_vcpu_irqs()
Subject 2: md/raid1: Fix exception handling in setup_conf()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 2
Subject 1: irqchip/gic-v4: Fix exception handling in
its_alloc_vcpu_sgis()
Subject 2: md/raid1: Fix exception handling in setup_conf()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 1
Subject 1: powerpc/4xx: Fix exception handling in
ppc4xx_pciex_port_setup_hose()
Subject 2: powerpc/pseries: Do not pass an error pointer to
of_node_put() in pSeries_reconfig_add_node()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 2
Subject 1: powerpc/4xx: Fix exception handling in
ppc4xx_probe_pcix_bridge()
Subject 2: powerpc/pseries: Do not pass an error pointer to
of_node_put() in pSeries_reconfig_add_node()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 3
Subject 1: powerpc/4xx: Fix exception handling in
ppc4xx_probe_pci_bridge()
Subject 2: powerpc/pseries: Do not pass an error pointer to
of_node_put() in pSeries_reconfig_add_node()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 4
Subject 1: powerpc/4xx: Delete unnecessary variable initialisations
in four functions
Subject 2: powerpc/pseries: Do not pass an error pointer to
of_node_put() in pSeries_reconfig_add_node()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 1
Subject 1: selinux: Improve exception handling in security_get_bools()
Subject 2: irqchip/gic-v4: Fix exception handling in
its_alloc_vcpu_irqs()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 1
Subject 1: selinux: Adjust implementation of security_get_bools()
Subject 2: powerpc/4xx: Fix exception handling in
ppc4xx_pciex_port_setup_hose()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 1
Subject 1: IB/uverbs: Improve exception handling in create_qp()
Subject 2: selinux: Improve exception handling in security_get_bools()
2 is a reply... replacing existing: selinux: Improve exception
handling in security_get_bools()
WARNING: duplicate messages found at index 2
Subject 1: IB/uverbs: Delete a duplicate check in create_qp()
Subject 2: irqchip/gic-v4: Fix exception handling in
its_alloc_vcpu_irqs()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 1
Subject 1: powerpc/4xx: Fix exception handling in
ppc4xx_pciex_port_setup_hose()
Subject 2: IB/uverbs: Improve exception handling in create_qp()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 2
Subject 1: powerpc/4xx: Fix exception handling in
ppc4xx_probe_pcix_bridge()
Subject 2: IB/uverbs: Improve exception handling in create_qp()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 3
Subject 1: powerpc/4xx: Fix exception handling in
ppc4xx_probe_pci_bridge()
Subject 2: IB/uverbs: Improve exception handling in create_qp()
2 is not a reply... assume additional patch
WARNING: duplicate messages found at index 4
Subject 1: powerpc/4xx: Delete unnecessary variable initialisations
in four functions
Subject 2: IB/uverbs: Improve exception handling in create_qp()
2 is not a reply... assume additional patch
Looking for additional code-review trailers on lore.kernel.org
Will use the latest revision: v17
You can pick other revisions using the -vN flag
Checking attestation on all messages, may take a moment...
---
✗ [PATCH] perf cputopo: Improve exception handling in
build_cpu_topology()
---
✗ BADSIG: DKIM/web.de
✓ Signed: DKIM/inria.fr (From: Markus.Elfring@web.de)
---
Total patches: 1
---
Application de perf cputopo: Improve exception handling in
build_cpu_topology()
Sorry I forgot to send the email. It is the same kind of problem as the other series: Message IDs and/or In-Reply-To headers are messed up
Three mailing list archive interfaces can present a mostly consistent view for
the involved message threads, can't they?
and b4 ends up applying an unrelated patch instead of applying the series as you can see below:
$ b4 shazam f5ac19db-c7d5-9a94-aa37-9bb448fe665f@web.de
…
This development tool is also still evolving.
Are you looking for corresponding software extensions?
https://b4.docs.kernel.org/en/latest/#getting-help
How do you think about to start with the desired cover letter from the provided patch series
for another integration attempt?
Regards,
Markus