Skip to content

[PW_SID:987769] irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check - #719

Closed
linux-riscv-bot wants to merge 2 commits into
workflowfrom
pw987769
Closed

[PW_SID:987769] irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check#719
linux-riscv-bot wants to merge 2 commits into
workflowfrom
pw987769

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 987769 applied to workflow

Name: irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=987769
Version: 1

Linux RISC-V bot and others added 2 commits August 1, 2025 17:51
Smatch reported a warning in imsic_irqdomain_init():

drivers/irqchip/irq-riscv-imsic-platform.c:317 imsic_irqdomain_init() warn: variable dereferenced before check 'imsic' (see line 311)

The variable imsic was dereferenced before being checked for NULL.
To fix this, move the initialization of struct irq_domain_info after
the NULL check to avoid accessing imsic prematurely.

Fixes: 5942290 ("irqchip/riscv-imsic: Convert to msi_create_parent_irq_domain() helper")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202507311953.NFVZkr0a-lkp@intel.com/
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 105.98 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1113.55 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1547.01 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.81 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.85 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.62 seconds
Result: WARNING
Output:

WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#16: 
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>

total: 0 errors, 1 warnings, 0 checks, 23 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 ef919f69a78b ("irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check") 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, 1 warnings, 0 checks, 23 lines checked
WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 76.70 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
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: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-imsic: Fix 'imsic' dereferenced before NULL check"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow branch 16 times, most recently from 7c3709d to 25d60d7 Compare August 6, 2025 13:21
@linux-riscv-bot
linux-riscv-bot force-pushed the workflow branch 2 times, most recently from f9e6a09 to a9543cb Compare August 8, 2025 04:34
@linux-riscv-bot
linux-riscv-bot deleted the pw987769 branch August 9, 2025 01:05
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