[PW_SID:1150319] mailbox: riscv-sbi-mpxy: Fix inverted notification loop - #2515
[PW_SID:1150319] mailbox: riscv-sbi-mpxy: Fix inverted notification loop#2515linux-riscv-bot wants to merge 1 commit into
Conversation
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>
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Fix inverted notification loop" |
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