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

2017-12-01 Thread Tom Herbert
On Thu, Nov 30, 2017 at 4:22 PM, Al Viro wrote: > 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

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

2017-12-01 Thread Eric Dumazet
Sorry for top posting. Lets CC Tom on this patch ? On Fri, 2017-12-01 at 00:22 +, Al Viro wrote: > 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. > >

[PATCH 2/3] fix kcm_clone()

2017-11-30 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