diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c index e91260a6156b..15e5e6ec5968 100644 --- a/io_uring/kbuf.c +++ b/io_uring/kbuf.c @@ -640,7 +640,7 @@ int io_register_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg) return -ENOMEM; } - mmap_offset = reg.bgid << IORING_OFF_PBUF_SHIFT; + mmap_offset = (unsigned long)reg.bgid << IORING_OFF_PBUF_SHIFT; ring_size = flex_array_size(br, bufs, reg.ring_entries); memset(&rd, 0, sizeof(rd));