1
0
Fork 0
remarkable-linux/net/kcm
Al Viro e587b76e65 fix kcm_clone()
commit a5739435b5 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-17 15:07:59 +01:00
..
Kconfig kcm: Use stream parser 2016-08-17 19:36:23 -04:00
Makefile kcm: Add statistics and proc interfaces 2016-03-09 16:36:14 -05:00
kcmproc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kcmsock.c fix kcm_clone() 2017-12-17 15:07:59 +01:00