Al Viro 80c0f4777f fix kcm_clone()
commit a5739435b5a3b8c449f8844ecd71a3b1e89f0a33 upstream.

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 conventions.

Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-16 16:25:47 +01:00
..
2016-12-03 23:54:25 -05:00
2017-11-15 15:53:17 +01:00
2017-12-16 16:25:45 +01:00
2017-12-16 16:25:47 +01:00
2016-05-29 22:33:25 -07:00
2016-10-20 11:23:08 -04:00
2017-10-08 10:26:06 +02:00
2016-08-17 19:36:23 -04:00
2016-08-17 19:36:23 -04:00