Skip to content

[PW_SID:1150319] mailbox: riscv-sbi-mpxy: Fix inverted notification loop - #2515

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

[PW_SID:1150319] mailbox: riscv-sbi-mpxy: Fix inverted notification loop#2515
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1150319

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1150319 applied to workflow__riscv__fixes

Name: mailbox: riscv-sbi-mpxy: Fix inverted notification loop
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1150319
Version: 1

In mpxy_mbox_peek_rpmi_data(), the while loop condition checks:

  (events_data_len - pos) <= sizeof(*event)

This is inverted. The loop should continue while there is enough
remaining data to hold at least one event header, i.e. >=. With <=
the loop body is entered only when the remaining data is smaller than
one header, which is never useful. In practice, since events_data_len
is always larger than sizeof(*event) (4 bytes), the condition is false
on the first iteration and the loop is never entered.

All RPMI notification events are silently dropped.

Fix the condition from <= to >=.

Fixes: bf3022a ("mailbox: Add RISC-V SBI message proxy (MPXY) based mailbox driver")
Signed-off-by: liutong <liutong@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 146.17 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1170.79 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1472.44 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 28.68 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 30.05 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.78 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 90.38 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
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: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot deleted the pw1150319 branch August 31, 2026 01:09
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