]> git.karo-electronics.de Git - karo-tx-linux.git/commit
unexport sock_map_fd(), switch to sock_alloc_file()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Aug 2012 04:25:51 +0000 (00:25 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 22 Aug 2012 21:29:28 +0000 (17:29 -0400)
commit32b529f92ea715fd5c1327a355a305cb612771b6
tree2011f77bbe1e219b2f7924285049cfdf0f225807
parentf8a78429cc70adbd7357ff6a0c70554762c60815
unexport sock_map_fd(), switch to sock_alloc_file()

Both modular callers of sock_map_fd() had been buggy; sctp one leaks
descriptor and file if copy_to_user() fails, 9p one shouldn't be
exposing file in the descriptor table at all.

Switch both to sock_alloc_file(), export it, unexport sock_map_fd() and
make it static.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/net.h
net/9p/trans_fd.c
net/sctp/socket.c
net/socket.c