From: Pavel Begunkov Date: Sat, 19 Apr 2025 17:47:06 +0000 (+0100) Subject: io_uring/rsrc: remove null check on import X-Git-Tag: v6.16-rc1~215^2~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be6bad57b217491733754ae8113eec94a90a2769;p=thirdparty%2Flinux.git io_uring/rsrc: remove null check on import WARN_ON_ONCE() checking imu for NULL in io_import_fixed() is in the hot path and too protective, it's time to get rid of it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3782c01e311dbd474bca45aefaf79a2f2822fafb.1745083025.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 5d25f3391650c..b4c5f3ee88554 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -1058,8 +1058,6 @@ static int io_import_fixed(int ddir, struct iov_iter *iter, size_t offset; int ret; - if (WARN_ON_ONCE(!imu)) - return -EFAULT; ret = validate_fixed_range(buf_addr, len, imu); if (unlikely(ret)) return ret;