Re: [PATCH] io_uring/kbuf: align legacy buffer add limit with MAX_BIDS_PER_BGID
Jens Axboe <[email protected]>
| Newsgroups | org.kernel.vger.io-uring |
|---|---|
| Message-ID | <177997699463.94267.12840010669165233758.b4-ty@b4> |
On Thu, 28 May 2026 10:49:36 +0800, [email protected] wrote: > io_provide_buffers_prep() accepts nbufs up to MAX_BIDS_PER_BGID, but > io_add_buffers() stops when bl->nbufs reaches USHRT_MAX. This makes the > effective add limit one lower than the validated limit. > > Use MAX_BIDS_PER_BGID in the add-side boundary check so validation and > execution use the same limit, and update the comment to refer to the > actual limit constant. > > [...] Applied, thanks! [1/1] io_uring/kbuf: align legacy buffer add limit with MAX_BIDS_PER_BGID commit: ca55f98d6ff1ecb31a07b668a8d105b4e0829c6a Best regards, -- Jens Axboe