]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - net/socket.c
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>
Thu, 27 Sep 2012 01:08:50 +0000 (21:08 -0400)
commit56b31d1c9f1e6a3ad92e7bfe252721e05d92b285
tree44521dbcdf51695b6092f2a4dabe83f460c2ed7c
parent28407630513b1a86133db0ef8b39fabad6c494af
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