[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <lm4q7sgtfqabpuzkr73fz7xx7jinhwpwtdnhafoknngqvpduyn@srhrp6cnmnza>
Date: Fri, 10 Oct 2025 04:20:31 +0530
From: Brahmajit Das <listout@...tout.xyz>
To: yonghong.song@...ux.dev
Cc: andrii@...nel.org, ast@...nel.org, bpf@...r.kernel.org,
chandna.linuxkernel@...il.com, daniel@...earbox.net, david.hunter.linux@...il.com,
haoluo@...gle.com, john.fastabend@...il.com, jolsa@...nel.org, khalid@...nel.org,
martin.lau@...ux.dev, netdev@...r.kernel.org, skhan@...uxfoundation.org,
song@...nel.org, syzbot+1f1fbecb9413cdbfbef8@...kaller.appspotmail.com
Subject: Re: [PATCH] bpf: test_run: Fix timer mode initialization to
NO_MIGRATE mode
Yonghong Song,
> So I suspect that we can remove NO_PREEMPT/NO_MIGRATE in test_run.c
> and use migrate_disable()/migrate_enable() universally.
Would something like this work?
--- 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
Powered by blists - more mailing lists