-
Notifications
You must be signed in to change notification settings - Fork 5
bpf: test_run: fix atomic context in timer path causing sleep-in-atomic BUG #6126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpf: test_run: fix atomic context in timer path causing sleep-in-atomic BUG #6126
Conversation
|
Upstream branch: 39e9d5f |
|
Upstream branch: 39e9d5f |
5874fae to
c3de733
Compare
06bf66d to
4b3a35b
Compare
|
Upstream branch: 39e9d5f |
c3de733 to
efca8ad
Compare
4b3a35b to
ec7437a
Compare
|
Upstream branch: 48a97ff |
efca8ad to
61f42f7
Compare
ec7437a to
fa9b89f
Compare
|
Upstream branch: 27aab47 |
61f42f7 to
94f63d8
Compare
fa9b89f to
631bcf6
Compare
|
Upstream branch: 48a97ff |
94f63d8 to
857ff6a
Compare
631bcf6 to
db45b16
Compare
|
Upstream branch: 48a97ff |
857ff6a to
c31fecf
Compare
db45b16 to
cf0c057
Compare
|
Upstream branch: 48a97ff |
…ic BUG The timer mode is initialized to NO_PREEMPT mode by default, this disable preemption and force execution in atomic context causing issue on PREEMPT_RT configurations when invoking spin_lock_bh(), leading to the following warning: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6107, name: syz.0.17 preempt_count: 1, expected: 0 RCU nest depth: 1, expected: 1 Preemption disabled at: [<ffffffff891fce58>] bpf_test_timer_enter+0xf8/0x140 net/bpf/test_run.c:42 Fix this, by removing NO_PREEMPT/NO_MIGRATE mode check. Also, the test timer context no longer needs explicit calls to migrate_disable()/migrate_enable() with rcu_read_lock()/rcu_read_unlock(). Use helpers rcu_read_lock_dont_migrate() and rcu_read_unlock_migrate() instead. Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=1f1fbecb9413cdbfbef8 Tested-by: [email protected] Signed-off-by: Sahil Chandna <[email protected]> Acked-by: Yonghong Song <[email protected]>
c31fecf to
b188205
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1010864 expired. Closing PR. |
Pull request for series with
subject: bpf: test_run: fix atomic context in timer path causing sleep-in-atomic BUG
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1010864