lkml.org 
[lkml]   [2013]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] net: handle error more gracefully in socketpair()
From
From: Al Viro <viro@ZenIV.linux.org.uk>
Date: Fri, 6 Dec 2013 10:48:05 +0000

> On Thu, Dec 05, 2013 at 07:43:55PM -0500, David Miller wrote:
>> From: Yann Droneaud <ydroneaud@opteya.com>
>> Date: Fri, 06 Dec 2013 00:15:31 +0100
>>
>> > AFAIK, using sys_close() seems to be the exception, and writing the file
>> > descriptor before installing it is the more or less the norm.
>>
>> What other system call in the kernel writes a file descriptor's value
>> into the address space of a user process before the file descriptor
>> is actually usable?
>>
>> That's really terrible semantically.
>
> What's the problem with that? If nothing else, shared descriptor table is
> a lot more visible to other threads than two-element array, most likely
> in stack frame of whoever makes that syscall...
>
> As for your question, how about pipe(2)?

Fair enough, Yann please resubmit your patch.

Thanks.


\
 
 \ /
  Last update: 2013-12-06 18:41    [W:0.070 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site