Re: [bug report] io_uring: return iovec from __io_import_iovec

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

 



On 11/8/21 13:49, Dan Carpenter wrote:
Hello Pavel Begunkov,

The patch caa8fe6e86fd: "io_uring: return iovec from
__io_import_iovec" from Oct 15, 2021, leads to the following Smatch
static checker warning:

	fs/io_uring.c:3218 __io_import_iovec()
	warn: passing zero to 'ERR_PTR'

[...]
     3188
     3189         BUILD_BUG_ON(ERR_PTR(0) != NULL);

This is super paranoid.  :P

A bit, but gives an idea about assumptions

     3209                 ret = import_single_range(rw, buf, sqe_len, s->fast_iov, iter);
     3210                 return ERR_PTR(ret);

if (ret)
	return ERR_PTR(ret);
return NULL;

How about this? I have some hope in compilers, should be
optimised out

--
Pavel Begunkov



[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