Skip to content

Commit aaa736b

Browse files
committed
io_uring: specify freeptr usage for SLAB_TYPESAFE_BY_RCU io_kiocb cache
Doesn't matter right now as there's still some bytes left for it, but let's prepare for the io_kiocb potentially growing and add a specific freeptr offset for it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent ff1256b commit aaa736b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

io_uring/io_uring.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3846,6 +3846,8 @@ static int __init io_uring_init(void)
38463846
struct kmem_cache_args kmem_args = {
38473847
.useroffset = offsetof(struct io_kiocb, cmd.data),
38483848
.usersize = sizeof_field(struct io_kiocb, cmd.data),
3849+
.freeptr_offset = offsetof(struct io_kiocb, work),
3850+
.use_freeptr_offset = true,
38493851
};
38503852

38513853
#define __BUILD_BUG_VERIFY_OFFSET_SIZE(stype, eoffset, esize, ename) do { \

0 commit comments

Comments
 (0)