io_uring/rsrc: clear ->buf before mapping pages
authorJens Axboe <axboe@kernel.dk>
Tue, 29 Oct 2024 21:48:34 +0000 (15:48 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 29 Oct 2024 21:48:34 +0000 (15:48 -0600)
commitaff750e7094e26eae686965930ef2bec7f4152da
treecec5a6860157b633947d39fb710f0d40eeea23c7
parentcfcb00de0a91cce2637566541c48eb1afe6c44a2
io_uring/rsrc: clear ->buf before mapping pages

Just in case the error path is hit, ->buf should always be initialized
so that the put side will do the right thing. That is always the case
for any other call path, fix this one up too.

Fixes: 3f1a54644473 ("io_uring/rsrc: get rid of per-ring io_rsrc_node list")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c