android_kernel_sony_sdm845/net/9p
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Wang Hai 0396227f4d net/9p: Fix a potential socket leak in p9_socket_open
[ Upstream commit dcc14cfd7debe11b825cb077e75d91d2575b4cb8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:15:41 +01:00
..
client.c net/9p: Initialize the iounit field during fid creation 2022-08-25 11:09:27 +02:00
error.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
Kconfig net/9p: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:39:33 -08:00
Makefile [net/9p] Preparation and helper functions for zero copy 2011-03-15 09:57:34 -05:00
mod.c 9p: Reduce object size with CONFIG_NET_9P_DEBUG 2012-01-05 10:51:44 -06:00
protocol.c 9p: p9dirent_read: check network-provided name length 2019-07-10 09:55:37 +02:00
protocol.h net/9p: Convert net/9p protocol dumps to tracepoints 2011-10-24 11:13:12 -05:00
trans_common.c net/9p: include trans_common.h to fix missing prototype warning. 2019-07-10 09:55:38 +02:00
trans_common.h net/9p: remove (now-)unused helpers 2015-04-11 22:28:29 -04:00
trans_fd.c net/9p: Fix a potential socket leak in p9_socket_open 2022-12-08 11:15:41 +01:00
trans_rdma.c 9p/rdma: remove useless check in cm_event_handler 2019-07-10 09:55:37 +02:00
trans_virtio.c 9p/trans_virtio: Remove sysfs file on probe failure 2021-09-26 13:36:18 +02:00
util.c net/9p: convert to idr_alloc() 2013-02-27 19:10:20 -08:00