lkml.org 
[lkml]   [2022]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v1 3/3] af_vsock: SOCK_SEQPACKET broken buffer test
On Tue, Mar 15, 2022 at 09:34:35AM +0000, Krasnov Arseniy Vladimirovich 
wrote:
>On 15.03.2022 11:36, Stefano Garzarella wrote:
>>
>> Is this the right behavior? If read() fails because the buffer is invalid, do we throw out the whole packet?
>>
>> I was expecting the packet not to be consumed, have you tried AF_UNIX, does it have the same behavior?
>
>I've just checked AF_UNIX implementation of SEQPACKET receive in net/unix/af_unix.c. So, if 'skb_copy_datagram_msg()'
>fails, it calls 'skb_free_datagram()'. I think this means that whole sk buff will be dropped, but anyway, i'll check
>this behaviour in practice. See '__unix_dgram_recvmsg()' in net/unix/af_unix.c.
>

Yep. you are right it seems to be discarded but I don't know that
code very well, so better to test as you said ;-)

Thanks,
Stefano

\
 
 \ /
  Last update: 2022-03-15 12:50    [W:0.045 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site