]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/bpf_filter: use bpf_prog_run_pin_on_cpu() to prevent migration
authorJens Axboe <axboe@kernel.dk>
Mon, 9 Mar 2026 20:20:14 +0000 (14:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Mar 2026 20:20:14 +0000 (14:20 -0600)
Since the caller, __io_uring_run_bpf_filters(), doesn't prevent
migration, it should use the migration disabling variant for running
the BPF program.

Fixes: d42eb05e60fe ("io_uring: add support for BPF filtering for opcode restrictions")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/bpf_filter.c

index 28a23e92ee811c478ed372883a1e96cb20c362aa..9cc44764e0ac54a119a3e629279681aeb4bb7bf2 100644 (file)
@@ -85,7 +85,7 @@ int __io_uring_run_bpf_filters(struct io_bpf_filter __rcu **filters,
        do {
                if (filter == &dummy_filter)
                        return -EACCES;
-               ret = bpf_prog_run(filter->prog, &bpf_ctx);
+               ret = bpf_prog_run_pin_on_cpu(filter->prog, &bpf_ctx);
                if (!ret)
                        return -EACCES;
                filter = filter->next;