Re: [PATCH] io_uring: Fix NULL dereference in error in io_sqe_files_register()

Jens Axboe
2021-02-01T18:58:27Z

On 2/1/21 5:23 AM, Dan Carpenter wrote:
> If we hit a "goto out_free;" before the "ctx->file_data" pointer has
> been assigned then it leads to a NULL derefence when we call:
>
> free_fixed_rsrc_data(ctx->file_data);
>
> We can fix this by moving the assignment earlier.

Applied, thanks Dan.

--
Jens Axboe