Eric Dumazet
3257d8b12f
inet: fix possible request socket leak
...
In commit b357a364c5 ("inet: fix possible panic in
reqsk_queue_unlink()"), I missed fact that tcp_check_req()
can return the listener socket in one case, and that we must
release the request socket refcount or we leak it.
Tested:
Following packetdrill test template shows the issue
0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0 bind(3, ..., ...) = 0
+0 listen(3, 1) = 0
+0 < S 0:0(0) win 2920 <mss 1460,sackOK,nop,nop>
+0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK>
+.002 < . 1:1(0) ack 21 win 2920
+0 > R 21:21(0)
Fixes: b357a364c5 ("inet: fix possible panic in reqsk_queue_unlink()")
Signed-off-by: Eric Dumazet <edumazet@google.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2015-08-10 21:17:45 -07:00
..
2015-08-10 13:55:07 +02:00
2015-06-24 02:58:51 -07:00
2014-09-18 10:54:36 +02:00
2015-07-28 23:41:24 -07:00
2015-04-03 12:11:15 -04:00
2015-07-15 17:25:51 -07:00
2015-07-28 23:38:13 -07:00
2015-05-28 11:23:20 +08:00
2015-06-24 02:15:54 -07:00
2015-07-24 22:46:11 -07:00
2015-06-24 02:15:54 -07:00
2015-07-24 22:46:11 -07:00
2015-07-27 14:29:11 -07:00
2015-04-16 12:11:19 -04:00
2015-05-13 15:59:13 -04:00
2014-09-08 15:23:05 -07:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-05-04 14:49:23 -04:00
2015-08-10 21:17:29 -07:00
2015-07-10 23:25:24 -07:00
2015-07-26 21:00:15 -07:00
2015-07-21 22:13:13 -07:00
2013-12-29 16:34:25 -05:00
2015-05-13 15:21:33 -04:00
2014-09-08 16:42:42 -07:00
2015-05-25 00:08:48 -04:00
2015-07-26 21:00:15 -07:00
2015-04-03 12:11:15 -04:00
2015-04-07 15:25:55 -04:00
2015-04-03 12:11:15 -04:00
2015-06-15 14:30:32 -07:00
2015-06-24 02:58:51 -07:00
2015-05-14 22:30:54 -04:00
2015-07-08 16:03:09 -07:00
2015-05-28 06:23:32 +02:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-05-17 13:08:29 -04:00
2015-04-07 15:25:55 -04:00
2015-06-11 00:09:12 -07:00
2015-06-11 00:09:12 -07:00
2015-06-16 14:12:34 -04:00
2015-05-01 22:02:47 -04:00
2015-05-09 16:42:32 -04:00
2014-09-19 17:15:31 -04:00
2015-04-13 18:18:05 -04:00
2015-07-24 22:46:11 -07:00
2015-06-07 15:19:52 -07:00
2015-05-30 17:37:44 -07:00
2015-01-28 22:18:37 -08:00
2015-06-14 12:57:45 -07:00
2015-05-31 21:49:14 -07:00
2015-03-11 16:51:51 -04:00
2015-06-10 23:28:33 -07:00
2015-06-15 19:49:22 -07:00
2015-06-23 02:38:10 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2015-04-29 17:10:38 -04:00
2015-07-15 17:17:21 -07:00
2015-08-10 21:17:45 -07:00
2014-05-03 19:23:07 -04:00
2015-02-12 18:54:10 -08:00
2015-04-07 18:36:39 -04:00
2015-06-01 22:51:30 -07:00
2015-06-11 16:33:10 -07:00
2015-06-11 16:33:11 -07:00
2014-09-01 18:12:45 -07:00
2015-01-28 22:18:37 -08:00
2015-05-17 22:45:48 -04:00
2015-04-29 17:10:38 -04:00
2015-04-29 17:10:38 -04:00
2015-01-28 22:18:37 -08:00
2015-05-05 19:50:09 -04:00
2015-01-28 22:18:37 -08:00
2015-07-27 01:06:53 -07:00
2015-06-15 19:49:22 -07:00
2015-03-02 13:06:31 -05:00
2015-04-03 12:11:15 -04:00
2015-05-11 10:50:18 -04:00
2015-08-03 22:16:50 -07:00
2014-05-23 16:28:53 -04:00
2015-04-07 15:25:55 -04:00
2013-12-26 13:43:21 -05:00
2015-03-25 14:07:04 -04:00
2015-04-07 15:25:55 -04:00
2015-04-03 12:11:15 -04:00
2014-06-30 07:49:47 +02:00
2013-12-18 16:58:20 -05:00
2013-05-31 17:19:05 -07:00