Re: [RFC][PATCHES] sock_alloc_file() cleanups and fixes

2017-12-05 Thread Al Viro
On Tue, Dec 05, 2017 at 02:44:43PM -0500, David Miller wrote: > From: Al Viro > Date: Mon, 4 Dec 2017 16:41:01 + > > > On Mon, Dec 04, 2017 at 10:35:24AM -0500, David Miller wrote: > >> From: Al Viro > >> Date: Fri, 1 Dec 2017 00:20:27 +

Re: [RFC][PATCHES] sock_alloc_file() cleanups and fixes

2017-12-05 Thread David Miller
From: Al Viro Date: Mon, 4 Dec 2017 16:41:01 + > On Mon, Dec 04, 2017 at 10:35:24AM -0500, David Miller wrote: >> From: Al Viro >> Date: Fri, 1 Dec 2017 00:20:27 + >> >> >1) massage sys_socketpair() (should be a pure cleanup) >> >

Re: [RFC][PATCHES] sock_alloc_file() cleanups and fixes

2017-12-04 Thread Al Viro
On Mon, Dec 04, 2017 at 10:35:24AM -0500, David Miller wrote: > From: Al Viro > Date: Fri, 1 Dec 2017 00:20:27 + > > > 1) massage sys_socketpair() (should be a pure cleanup) > > 2) fix and clean up kcm_clone() (-stable fodder) > > 3) switch

Re: [RFC][PATCHES] sock_alloc_file() cleanups and fixes

2017-12-04 Thread David Miller
From: Al Viro Date: Fri, 1 Dec 2017 00:20:27 + > 1) massage sys_socketpair() (should be a pure cleanup) > 2) fix and clean up kcm_clone() (-stable fodder) > 3) switch sock_alloc_file() to new calling conventions. > > It got some local

[RFC][PATCHES] sock_alloc_file() cleanups and fixes

2017-11-30 Thread Al Viro
Almost all sock_alloc_file() callers want sock_release() in case of failure. Currently it consumes socket on success (it will be destroyed on final fput() of resulting file) and leaves it alone on failure. Making it consume socket in all cases makes for simpler life in callers.