Wei Yongjun
b8ad540dd4
mptcp: fix memory leak in mptcp_subflow_create_socket()
...
socket malloced by sock_create_kern() should be release before return
in the error handling, otherwise it cause memory leak.
unreferenced object 0xffff88810910c000 (size 1216):
comm "00000003_test_m", pid 12238, jiffies 4295050289 (age 54.237s)
hex dump (first 32 bytes):
01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 2f 30 0a 81 88 ff ff ........./0.....
backtrace:
[<00000000e877f89f>] sock_alloc_inode+0x18/0x1c0
[<0000000093d1dd51>] alloc_inode+0x63/0x1d0
[<000000005673fec6>] new_inode_pseudo+0x14/0xe0
[<00000000b5db6be8>] sock_alloc+0x3c/0x260
[<00000000e7e3cbb2>] __sock_create+0x89/0x620
[<0000000023e48593>] mptcp_subflow_create_socket+0xc0/0x5e0
[<00000000419795e4>] __mptcp_socket_create+0x1ad/0x3f0
[<00000000b2f942e8>] mptcp_stream_connect+0x281/0x4f0
[<00000000c80cd5cc>] __sys_connect_file+0x14d/0x190
[<00000000dc761f11>] __sys_connect+0x128/0x160
[<000000008b14e764>] __x64_sys_connect+0x6f/0xb0
[<000000007b4f93bd>] do_syscall_64+0xa1/0x530
[<00000000d3e770b6>] entry_SYSCALL_64_after_hwframe+0x49/0xb3
Fixes: 2303f994b3e1 ("mptcp: Associate MPTCP context with TCP socket")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-15 18:08:50 -07:00
..
2020-06-14 01:57:21 +09:00
2020-06-02 08:00:39 +02:00
2020-02-24 13:02:53 -08:00
2020-06-13 16:27:13 -07:00
2020-05-18 17:35:02 -07:00
2020-06-13 16:27:13 -07:00
2020-05-24 13:47:27 -07:00
2020-06-09 12:59:45 -07:00
2020-06-03 16:27:18 -07:00
2020-05-19 17:56:34 +02:00
2020-05-26 00:03:16 +09:00
2020-06-13 16:27:13 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-08 12:49:18 -07:00
2020-06-13 16:27:13 -07:00
2020-06-14 01:57:21 +09:00
2020-06-13 16:27:13 -07:00
2020-06-14 01:57:21 +09:00
2020-04-28 14:39:46 -07:00
2020-06-13 16:27:13 -07:00
2020-05-23 16:56:17 -07:00
2020-06-05 13:10:02 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2019-09-26 08:56:17 +02:00
2020-06-13 16:27:13 -07:00
2020-06-15 13:29:39 -07:00
2020-05-19 12:50:14 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-02-26 20:38:13 -08:00
2020-06-13 16:27:13 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-15 18:08:50 -07:00
2020-06-14 01:57:21 +09:00
2020-06-15 18:06:52 -07:00
2020-06-14 01:57:21 +09:00
2020-06-13 16:27:13 -07:00
2020-06-09 12:59:45 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-04-27 02:07:40 -04:00
2020-05-23 16:36:05 -07:00
2020-06-14 01:57:21 +09:00
2020-06-15 12:58:59 -07:00
2019-12-16 10:15:49 +01:00
2020-06-09 12:59:45 -07:00
2020-06-11 18:18:22 -07:00
2020-06-15 18:06:52 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-11 12:22:41 -07:00
2020-06-14 01:57:21 +09:00
2020-06-13 16:27:13 -07:00
2020-06-14 01:57:21 +09:00
2020-06-14 01:57:21 +09:00
2020-06-05 13:18:26 -07:00
2020-06-13 16:27:13 -07:00
2020-06-14 01:57:21 +09:00
2020-06-13 16:27:13 -07:00
2020-06-14 01:57:21 +09:00
2020-06-01 12:05:45 -07:00
2020-05-23 16:56:17 -07:00
2020-06-14 01:57:21 +09:00
2020-05-23 16:56:17 -07:00
2020-05-29 13:10:39 -07:00