]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/bpf_filters: retain COW'ed settings on parse failures
authorJens Axboe <axboe@kernel.dk>
Tue, 31 Mar 2026 14:16:58 +0000 (08:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Apr 2026 14:34:14 +0000 (08:34 -0600)
commitaa35dd6bdd033dea8aa3e20cbbbe10e06b2d044f
tree1170b68cd91f716ea965ba6c4d537f8bc3d8ae6f
parent61a11cf4812726aceaee17c96432e1c08f6ed6cb
io_uring/bpf_filters: retain COW'ed settings on parse failures

If io_parse_restrictions() fails, it ends up clearing any restrictions
currently set. The intent is only to clear whatever it already applied,
but it ends up clearing everything, including whatever settings may have
been applied in a copy-on-write fashion already. Ensure that those are
retained.

Link: https://lore.kernel.org/io-uring/CAK8a0jzF-zaO5ZmdOrmfuxrhXuKg5m5+RDuO7tNvtj=kUYbW7Q@mail.gmail.com/
Reported-by: antonius <bluedragonsec2023@gmail.com>
Fixes: ed82f35b926b ("io_uring: allow registration of per-task restrictions")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/register.c