Displaying 1 result from an estimated 1 matches for "pipe_advance".
2019 Sep 25
0
[PATCH] vhost: It's better to use size_t for the 3rd parameter of vhost_exceeds_weight()
...gt;count < size, when this happens, i->count -= size may cause len exceed INT_MAX, and then total_len exceed INT_MAX.
>
> handle_tx_copy() ->
> get_tx_bufs(..., &len, ...) ->
> init_iov_iter() ->
> iov_iter_advance(iter, ...) // has 3 branches:
> pipe_advance() // has checked the size: if (unlikely(i->count < size)) size = i->count;
> iov_iter_is_discard() ... // no check.
Yes, but I don't think we use ITER_DISCARD.
Thanks
> iterate_and_advance() //has checked: if (unlikely(i->count < n)) n = i->count;
>...