lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] tcp: Return error instead of partial read for saved syn headers
From
Date
On Mon, 2015-05-18 at 11:41 -0700, Rick Jones wrote:
> On 05/18/2015 11:35 AM, Eric B Munson wrote:
> > Currently the getsockopt() requesting the cached contents of the syn
> > packet headers will fail silently if the caller uses a buffer that is
> > too small to contain the requested data. Rather than fail silently and
> > discard the headers, getsockopt() should return an error and report the
> > required size to hold the data.
>
> Is there any chapter and verse on whether a "failed" getsockopt() may
> alter the items passed to it?

This should be fine.

getsockopt() has two copyout to perform, the second one can fail.

We can not 'undo' the first one in a safe way.




\
 
 \ /
  Last update: 2015-05-18 21:21    [W:0.077 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site