Skip to content

Commit 695673e

Browse files
axboegregkh
authored andcommitted
io_uring/kbuf: drop WARN_ON_ONCE() from incremental length check
Partially based on commit 98b6fa6 upstream. This can be triggered by userspace, so just drop it. The condition is appropriately handled. Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 93e9d02 commit 695673e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/kbuf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static inline bool io_kbuf_commit(struct io_kiocb *req,
143143
struct io_uring_buf *buf;
144144

145145
buf = io_ring_head_to_buf(bl->buf_ring, bl->head, bl->mask);
146-
if (WARN_ON_ONCE(len > buf->len))
146+
if (len > buf->len)
147147
len = buf->len;
148148
buf->len -= len;
149149
if (buf->len) {

0 commit comments

Comments
 (0)