powerpc/pseries: Fix exception handling in pSeries_reconfig_add_node()
Markus Elfring
Markus.Elfring at web.de
Sat Mar 18 01:20:12 AEDT 2023
>> 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?
Please take another look at available information sources.
https://lore.kernel.org/cocci/f9303bdc-b1a7-be5e-56c6-dfa8232b8b55@web.de/
https://sympa.inria.fr/sympa/arc/cocci/2023-03/msg00017.html
Another command example:
Markus_Elfring at Sonne:…/Projekte/Linux/next-patched> spatch --timeout 23 -j4 --chunksize 1 -dir . …/Projekte/Coccinelle/janitor/show_jumps_to_pointer_check.cocci > ../show_jumps_to_pointer_check-next-20230315.diff 2> ../show_jumps_to_pointer_check-errors-next-20230315.txt
Regards,
Markus
More information about the Linuxppc-dev
mailing list