Re: [PATCH v2] net: handle error more gracefully in socketpair()

2013-12-06 Thread David Miller
From: Al Viro Date: Fri, 6 Dec 2013 10:48:05 + > On Thu, Dec 05, 2013 at 07:43:55PM -0500, David Miller wrote: >> From: Yann Droneaud >> 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 i

Re: [PATCH v2] net: handle error more gracefully in socketpair()

2013-12-06 Thread Al Viro
On Thu, Dec 05, 2013 at 07:43:55PM -0500, David Miller wrote: > From: Yann Droneaud > 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

Re: [PATCH v2] net: handle error more gracefully in socketpair()

2013-12-06 Thread Yann Droneaud
Hi, Le jeudi 05 décembre 2013 à 19:43 -0500, David Miller a écrit : > From: Yann Droneaud > 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 syst

Re: [PATCH v2] net: handle error more gracefully in socketpair()

2013-12-05 Thread David Miller
From: Yann Droneaud 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 u

Re: [PATCH v2] net: handle error more gracefully in socketpair()

2013-12-05 Thread Yann Droneaud
Hi, Le jeudi 05 décembre 2013 à 16:23 -0500, David Miller a écrit : > From: Yann Droneaud > Date: Mon, 2 Dec 2013 11:12:26 +0100 > > > socketpair() error paths can be simplified to not call > > heavy-weight sys_close(). > > > > This patch makes socketpair() use of error paths which do not > >

Re: [PATCH v2] net: handle error more gracefully in socketpair()

2013-12-05 Thread David Miller
From: Yann Droneaud Date: Mon, 2 Dec 2013 11:12:26 +0100 > socketpair() error paths can be simplified to not call > heavy-weight sys_close(). > > This patch makes socketpair() use of error paths which do not > rely on heavy-weight call to sys_lose(): it's better to try > to push the file descri

[PATCH v2] net: handle error more gracefully in socketpair()

2013-12-02 Thread Yann Droneaud
socketpair() error paths can be simplified to not call heavy-weight sys_close(). This patch makes socketpair() use of error paths which do not rely on heavy-weight call to sys_lose(): it's better to try to push the file descriptor to userspace before installing the socket file to the file descript