lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] vsock/virtio: add support for MSG_PEEK
From
Date


On 9/27/19 1:55 AM, Stefano Garzarella wrote:

> Good catch!
>
> Maybe we can solve in this way:
>
> list_for_each_entry(pkt, &vvs->rx_queue, list) {
> size_t off = pkt->off;
>
> if (total == len)
> break;
>
> while (total < len && off < pkt->len) {
> /* using 'off' instead of 'pkt->off' */
> ...
>
> total += bytes;
> off += bytes;
> }
> }
>
> What do you think?
>

Maybe, but I need to see a complete patch, evil is in the details :)

\
 
 \ /
  Last update: 2019-09-27 15:37    [W:0.053 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site