diff options
| author | Jiawei Ye <[email protected]> | 2024-11-08 08:18:52 +0000 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2024-11-08 20:41:43 +0000 |
| commit | fb86c42a2a5d44e849ddfbc98b8d2f4f40d36ee3 (patch) | |
| tree | 607ea32b5a3f99d9637db7e43d8e8ddbb5a04c14 /drivers/usb/cdns3/cdns3-ti.c | |
| parent | bpf: Add sk_is_inet and IS_ICSK check in tls_sw_has_ctx_tx/rx (diff) | |
| download | kernel-fb86c42a2a5d44e849ddfbc98b8d2f4f40d36ee3.tar.gz kernel-fb86c42a2a5d44e849ddfbc98b8d2f4f40d36ee3.zip | |
bpf: Fix mismatched RCU unlock flavour in bpf_out_neigh_v6
In the bpf_out_neigh_v6 function, rcu_read_lock() is used to begin an RCU
read-side critical section. However, when unlocking, one branch
incorrectly uses a different RCU unlock flavour rcu_read_unlock_bh()
instead of rcu_read_unlock(). This mismatch in RCU locking flavours can
lead to unexpected behavior and potential concurrency issues.
This possible bug was identified using a static analysis tool developed
by myself, specifically designed to detect RCU-related issues.
This patch corrects the mismatched unlock flavour by replacing the
incorrect rcu_read_unlock_bh() with the appropriate rcu_read_unlock(),
ensuring that the RCU critical section is properly exited. This change
prevents potential synchronization issues and aligns with proper RCU
usage patterns.
Fixes: 09eed1192cec ("neighbour: switch to standard rcu, instead of rcu_bh")
Signed-off-by: Jiawei Ye <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-ti.c')
0 files changed, 0 insertions, 0 deletions
