Eric Dumazet
9f55757482
tcp: fix MSG_SENDPAGE_NOTLAST logic
...
[ Upstream commit ae62ca7b03 ]
commit 35f9c09fe9 (tcp: tcp_sendpages() should call tcp_push() once)
added an internal flag : MSG_SENDPAGE_NOTLAST meant to be set on all
frags but the last one for a splice() call.
The condition used to set the flag in pipe_to_sendpage() relied on
splice() user passing the exact number of bytes present in the pipe,
or a smaller one.
But some programs pass an arbitrary high value, and the test fails.
The effect of this bug is a lack of tcp_push() at the end of a
splice(pipe -> socket) call, and possibly very slow or erratic TCP
sessions.
We should both test sd->total_len and fact that another fragment
is in the pipe (pipe->nrbufs > 1)
Many thanks to Willy for providing very clear bug report, bisection
and test programs.
Reported-by: Willy Tarreau <w@1wt.eu >
Bisected-by: Willy Tarreau <w@1wt.eu >
Tested-by: Willy Tarreau <w@1wt.eu >
Signed-off-by: Eric Dumazet <edumazet@google.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2013-02-14 10:47:36 -08:00
..
2011-10-03 11:40:22 -07:00
2011-03-31 11:26:23 -03:00
2011-05-28 01:02:53 -04:00
2012-03-23 11:20:51 -07:00
2012-10-21 09:17:10 -07:00
2011-08-29 13:29:06 -07:00
2011-05-28 01:02:50 -04:00
2012-08-09 08:27:50 -07:00
2011-03-31 11:26:23 -03:00
2012-10-21 09:17:10 -07:00
2013-02-03 18:21:37 -06:00
2011-06-20 10:44:19 -04:00
2011-05-28 01:02:54 -04:00
2011-07-17 23:22:02 -04:00
2011-05-19 16:55:28 +09:30
2011-03-22 17:44:17 -07:00
2011-05-26 13:19:00 -07:00
2012-11-26 11:34:55 -08:00
2011-03-10 08:52:07 +01:00
2011-07-17 23:20:29 -04:00
2011-03-15 02:21:44 -04:00
2011-05-26 07:26:56 -04:00
2012-09-14 10:00:50 -07:00
2013-01-21 11:44:59 -08:00
2011-05-31 19:42:24 +09:00
2011-05-10 10:16:21 +02:00
2011-07-21 10:59:16 -07:00
2012-09-14 10:00:50 -07:00
2013-01-17 08:44:12 -08:00
2011-12-21 12:57:41 -08:00
2012-06-22 11:34:14 -07:00
2011-05-28 01:02:52 -04:00
2011-05-28 01:02:54 -04:00
2011-11-11 09:35:59 -08:00
2012-08-01 12:27:18 -07:00
2012-10-21 09:17:10 -07:00
2012-12-03 12:59:14 -08:00
2013-01-17 08:43:57 -08:00
2013-01-17 08:43:55 -08:00
2011-06-20 17:53:24 -05:00
2012-10-28 10:02:11 -07:00
2011-06-20 10:44:26 -04:00
2011-05-28 01:02:54 -04:00
2011-05-28 01:02:53 -04:00
2013-01-11 09:03:38 -08:00
2011-03-31 11:26:23 -03:00
2013-01-11 09:03:38 -08:00
2013-02-11 08:16:47 -08:00
2012-11-26 11:34:33 -08:00
2011-03-31 11:26:23 -03:00
2012-04-27 09:51:18 -07:00
2011-06-24 08:34:22 -07:00
2011-01-07 17:50:26 +11:00
2012-03-19 08:57:58 -07:00
2012-04-02 09:27:18 -07:00
2011-05-16 11:05:00 -07:00
2011-03-10 08:52:07 +01:00
2011-11-11 09:36:22 -08:00
2012-07-16 08:47:52 -07:00
2012-11-26 11:34:56 -08:00
2011-06-27 18:00:12 -07:00
2012-10-02 09:47:54 -07:00
2012-10-31 09:51:35 -07:00
2011-05-28 01:02:50 -04:00
2012-11-26 11:34:34 -08:00
2013-01-17 08:43:58 -08:00
2011-07-17 23:21:35 -04:00
2012-11-17 13:14:25 -08:00
2012-06-01 15:12:53 +08:00
2011-01-16 13:47:07 -05:00
2011-05-28 12:02:09 -04:00
2011-06-20 10:44:00 -04:00
2011-07-06 12:15:16 -07:00
2012-10-07 08:27:25 -07:00
2011-05-03 10:10:51 +10:00
2013-01-11 09:03:36 -08:00
2013-01-11 09:03:36 -08:00
2011-03-17 11:11:05 +01:00
2011-05-28 14:44:46 +02:00
2012-06-01 15:12:52 +08:00
2012-09-14 10:00:39 -07:00
2011-01-13 10:45:01 -08:00
2012-10-31 09:51:34 -07:00
2012-09-14 10:00:37 -07:00
2012-10-07 08:27:23 -07:00
2011-05-31 16:33:35 +02:00
2011-03-24 10:16:26 -07:00
2011-05-25 08:39:26 -07:00
2011-02-21 15:07:04 -08:00
2013-01-17 08:43:59 -08:00
2013-01-11 09:03:36 -08:00
2011-03-23 19:47:13 -07:00
2011-04-14 16:06:56 -07:00
2012-07-19 08:58:21 -07:00
2011-03-16 13:26:17 -07:00
2011-04-28 11:28:20 -07:00
2011-04-17 10:42:01 -07:00
2011-01-16 13:47:07 -05:00
2011-10-03 11:40:44 -07:00
2011-03-23 19:47:13 -07:00
2011-06-27 18:00:13 -07:00
2011-03-24 21:17:51 -04:00
2011-03-21 00:16:08 -04:00
2010-11-15 10:23:31 +01:00
2011-05-26 09:52:14 -07:00
2011-07-19 22:09:30 -07:00
2012-08-09 08:27:35 -07:00
2011-03-16 19:01:29 -07:00
2011-05-25 08:39:26 -07:00
2011-05-26 10:01:43 -06:00
2012-03-19 08:57:44 -07:00
2012-06-10 00:33:01 +09:00
2011-03-14 09:15:28 -04:00
2012-09-14 10:00:37 -07:00
2012-05-07 08:56:36 -07:00
2011-01-07 17:50:33 +11:00
2011-01-25 15:24:47 -05:00
2011-01-12 20:06:58 -05:00
2011-03-21 00:16:08 -04:00
2011-12-21 12:57:36 -08:00
2012-02-29 16:34:35 -08:00
2013-02-14 10:47:36 -08:00
2012-10-02 09:47:23 -07:00
2011-11-11 09:37:08 -08:00
2012-05-21 09:40:05 -07:00
2011-03-24 10:16:26 -07:00
2011-06-14 11:46:14 +02:00
2011-03-23 19:47:13 -07:00
2011-05-28 12:02:09 -04:00