For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: [bpf?] [net?] BUG: sleeping function called from invalid context in sock_map_delete_elem
Author: listout@listout.xyz
#syz test
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -38,10 +38,7 @@ static void bpf_test_timer_enter(struct bpf_test_timer *t)
__acquires(rcu)
{
rcu_read_lock();
- if (t->mode == NO_PREEMPT)
- preempt_disable();
- else
- migrate_disable();
+ migrate_disable();
t->time_start = ktime_get_ns();
}
@@ -51,10 +48,7 @@ static void bpf_test_timer_leave(struct bpf_test_timer *t)
{
t->time_start = 0;
- if (t->mode == NO_PREEMPT)
- preempt_enable();
- else
- migrate_enable();
+ migrate_enable();
rcu_read_unlock();
}
--
Regards,
listout