Skip to content

[PW_SID:1088820] riscv: cpuinfo: Fix NULL dereference and inconsistent error code#1857

Closed
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1088820
Closed

[PW_SID:1088820] riscv: cpuinfo: Fix NULL dereference and inconsistent error code#1857
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1088820

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1088820 applied to workflow__riscv__fixes

Name: riscv: cpuinfo: Fix NULL dereference and inconsistent error code
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1088820
Version: 1

Fix a potential NULL pointer dereference in c_show() by ensuring
the device tree node returned by of_get_cpu_node() is checked before use.

Also replace a non-standard return value (-1) in
riscv_of_parent_hartid() with -ENODEV to follow Linux kernel
conventions for "not found" error returns.

Both issues improve robustness and consistency with existing RISC-V CPU info handling code.

Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1134.98 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1678.44 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.53 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.66 seconds
Result: WARNING
Output:

CHECK: Alignment should match open parenthesis
#40: FILE: arch/riscv/kernel/cpu.c:353:
+			if (!of_property_read_string(node, "compatible", &compat) &&
+				strcmp(compat, "riscv"))

total: 0 errors, 0 warnings, 1 checks, 26 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 2c8e3c4a760b ("riscv: cpuinfo: Fix NULL dereference and inconsistent error code") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 1 checks, 26 lines checked
CHECK: Alignment should match open parenthesis


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 86.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: cpuinfo: Fix NULL dereference and inconsistent error code"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 1.17 seconds
Result: ERROR
Output:

Commit 2c8e3c4a760b ("riscv: cpuinfo: Fix NULL dereference and inconsistent error code")
	author Signed-off-by missing
	author email:    mohamedaymanworkspace@gmail.com
	committer email: linux.riscv.bot@gmail.com
	Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>

Errors in tree with Signed-off-by, please fix!


@linux-riscv-bot linux-riscv-bot deleted the pw1088820 branch May 2, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants