diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2023-04-11 13:06:06 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-04-12 20:09:41 +0200 |
commit | 13c223962eac16f161cf9b6355209774c609af28 (patch) | |
tree | 9e4b653e853938015578464a5384f4d39cbfbce9 /io_uring/rsrc.c | |
parent | io_uring/rsrc: consolidate node caching (diff) | |
download | linux-13c223962eac16f161cf9b6355209774c609af28.tar.xz linux-13c223962eac16f161cf9b6355209774c609af28.zip |
io_uring/rsrc: zero node's rsrc data on alloc
struct io_rsrc_node::rsrc_data field is initialised on rsrc removal and
shouldn't be used before that, still let's play safe and zero the field
on alloc.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/09bd03cedc8da8a7974c5e6e4bf0489fd16593ab.1681210788.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.c')
-rw-r--r-- | io_uring/rsrc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 73f9e10d9bf0..329cc3851dfd 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -218,6 +218,7 @@ static struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx) return NULL; } + ref_node->rsrc_data = NULL; ref_node->refs = 1; INIT_LIST_HEAD(&ref_node->node); INIT_LIST_HEAD(&ref_node->item_list); |