Re: [PATCH 1/2] io_uring: fix ignoring xa_store errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/21/20 10:40, Pavel Begunkov wrote:
> @@ -8866,7 +8865,12 @@ static int io_uring_add_task_file(struct io_ring_ctx *ctx, struct file *file)
>  
>  		if (!old) {
>  			get_file(file);
> -			xa_store(&tctx->xa, (unsigned long)file, file, GFP_KERNEL);
> +			ret = xa_err(xa_store(&tctx->xa, (unsigned long)file,
> +						file, GFP_KERNEL));
> +			if (ret) {
> +				fput(file);
> +				return ret;
> +			}
>  		}
>  		tctx->last = file;
>  	}
Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux