io_uring: don't use ERR_PTR for user pointers
authorChristoph Hellwig <hch@lst.de>
Wed, 18 May 2022 08:40:01 +0000 (10:40 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 May 2022 12:18:56 +0000 (06:18 -0600)
commit984824db844a9bd6e9e15ee469241982526a6ccd
tree3b3cf90baa77bd113193170443045f6eb3e54d48
parent20cbd21d899b72765e38481a926c7b2008c64350
io_uring: don't use ERR_PTR for user pointers

ERR_PTR abuses the high bits of a pointer to transport error information.
This is only safe for kernel pointers and not user pointers.  Fix
io_buffer_select and its helpers to just return NULL for failure and get
rid of this abuse.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220518084005.3255380-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c