linux/net/9p
Wang Hai dcc14cfd7d net/9p: Fix a potential socket leak in p9_socket_open
Both p9_fd_create_tcp() and p9_fd_create_unix() will call
p9_socket_open(). If the creation of p9_trans_fd fails,
p9_fd_create_tcp() and p9_fd_create_unix() will return an
error directly instead of releasing the cscoket, which will
result in a socket leak.

This patch adds sock_release() to fix the leak issue.

Fixes: 6b18662e23 ("9p connect fixes")
Signed-off-by: Wang Hai <wanghai38@huawei.com>
ACKed-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-11-28 11:09:13 +00:00
..
client.c net/9p: allocate appropriate reduced message buffers 2022-10-05 07:05:41 +09:00
error.c 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
Kconfig 9p/trans_fd: split into dedicated module 2022-01-10 09:58:30 +09:00
Makefile 9p/trans_fd: split into dedicated module 2022-01-10 09:58:30 +09:00
mod.c net/p9: load default transports 2022-01-10 10:00:09 +09:00
protocol.c net/9p: add p9_msg_buf_size() 2022-10-05 07:05:41 +09:00
protocol.h net/9p: add p9_msg_buf_size() 2022-10-05 07:05:41 +09:00
trans_common.c 9p: fix file headers 2021-11-03 17:45:04 +09:00
trans_common.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
trans_fd.c net/9p: Fix a potential socket leak in p9_socket_open 2022-11-28 11:09:13 +00:00
trans_rdma.c net/9p: add 'pooled_rbuffers' flag to struct p9_trans_module 2022-10-05 07:05:41 +09:00
trans_virtio.c net/9p: add 'pooled_rbuffers' flag to struct p9_trans_module 2022-10-05 07:05:41 +09:00
trans_xen.c net/9p: add __init/__exit annotations to module init/exit funcs 2022-10-07 21:23:09 +09:00