> - if (unlikely(nr > LONG_MAX/sizeof(*iocbpp))) > - nr = LONG_MAX/sizeof(*iocbpp); > + if (nr > ctx->nr_events) > + nr = ctx->nr_events; This seems like a slight behavior change. What about splitting that into a separate, properly document patch? Otherwise looks fine: Reviewed-by: Christoph Hellwig <hch@xxxxxx>