Re: [PATCH 1/3] fix kcm_clone()

2017-12-05 Thread David Miller
From: Al Viro Date: Tue, 5 Dec 2017 23:27:57 + > 1) it's fput() or sock_release(), not both > 2) don't do fd_install() until the last failure exit. > 3) not a bug per se, but... don't attach socket to struct file >until it's set up. > > Take reserving descriptor into the caller, move fd_

[PATCH 1/3] fix kcm_clone()

2017-12-05 Thread Al Viro
1) it's fput() or sock_release(), not both 2) don't do fd_install() until the last failure exit. 3) not a bug per se, but... don't attach socket to struct file until it's set up. Take reserving descriptor into the caller, move fd_install() to the caller, sanitize failure exits and calling conve