Scott Long
07dbf2c768
Several fixes and improvements to sendfile()
...
1. If we wanted to send exactly as many bytes as the socket buffer is
sized for, the inner loop of kern_sendfile() would see that the
socket is full before seeing that it had no more bytes left to send.
This would cause it to return EAGAIN to the caller instead of
success. Fix by changing the order that these conditions are tested.
2. Simplify the calculation for the bytes to send in each iteration of
the inner loop of kern_sendfile()
3. Fix some calls with bogus arguments to sf_buf_ext(). These would
only trigger on mbuf allocation failure, but would be hilariously
bad if they did trigger.
Submitted by: gibbs(3), andre(2)
Reviewed by: emax, andre
Obtained from: Netflix
MFC after: 1 week
2013-03-28 14:14:28 +00:00
..
2012-08-21 18:13:09 +00:00
2013-03-21 22:59:01 +00:00
2012-08-15 15:42:57 +00:00
2012-09-25 19:16:28 +00:00
2012-07-22 13:41:45 +00:00
2013-03-13 22:01:31 +00:00
2012-06-28 07:33:43 +00:00
2011-03-06 22:59:30 +00:00
2013-02-02 11:58:35 +00:00
2013-03-21 23:02:19 +00:00
2012-10-22 17:50:54 +00:00
2012-10-22 17:50:54 +00:00
2013-03-05 10:18:48 +00:00
2013-03-04 11:09:56 +00:00
2013-03-04 12:20:48 +00:00
2012-12-22 13:33:28 +00:00
2012-10-06 19:50:23 +00:00
2011-09-16 13:58:51 +00:00
2012-03-10 18:56:16 +00:00
2012-08-30 21:22:47 +00:00
2012-10-22 17:50:54 +00:00
2013-03-03 23:25:45 +00:00
2011-11-07 06:44:47 +00:00
2012-08-14 19:16:30 +00:00
2013-03-13 06:42:01 +00:00
2013-03-09 09:07:13 +00:00
2013-03-09 02:32:23 +00:00
2013-03-02 00:53:12 +00:00
2011-11-07 06:44:47 +00:00
2011-12-01 07:19:13 +00:00
2013-03-02 00:53:12 +00:00
2012-10-22 17:50:54 +00:00
2011-04-13 11:28:46 +00:00
2011-05-31 15:11:43 +00:00
2013-03-04 11:22:19 +00:00
2012-12-18 18:34:36 +00:00
2011-04-12 08:13:18 +00:00
2012-05-26 20:03:47 +00:00
2013-02-08 07:29:07 +00:00
2012-10-22 17:50:54 +00:00
2012-10-22 17:50:54 +00:00
2013-01-06 21:47:59 +00:00
2011-11-07 06:44:47 +00:00
2011-09-16 13:58:51 +00:00
2013-02-04 09:35:48 +00:00
2013-01-17 21:28:31 +00:00
2013-02-02 14:19:50 +00:00
2012-08-22 20:01:57 +00:00
2012-12-22 09:37:34 +00:00
2012-08-16 02:35:44 +00:00
2013-03-27 11:34:27 +00:00
2012-03-28 20:58:30 +00:00
2011-11-07 15:43:11 +00:00
2012-12-18 07:36:45 +00:00
2013-03-09 02:32:23 +00:00
2012-11-14 10:33:12 +00:00
2013-03-14 23:20:18 +00:00
2012-05-30 16:06:38 +00:00
2012-10-26 16:01:08 +00:00
2013-03-07 02:53:29 +00:00
2012-12-22 09:37:34 +00:00
2012-12-22 09:37:34 +00:00
2012-03-27 15:07:43 +00:00
2013-03-09 02:32:23 +00:00
2013-03-09 02:32:23 +00:00
2013-03-18 18:04:09 +00:00
2012-12-09 04:54:22 +00:00
2012-12-22 09:37:34 +00:00
2013-03-18 17:23:58 +00:00
2013-03-01 18:49:14 +00:00
2013-03-04 11:09:56 +00:00
2012-05-26 20:03:47 +00:00
2013-03-21 14:06:27 +00:00
2013-03-12 06:58:49 +00:00
2013-03-25 09:43:50 +00:00
2013-03-21 19:58:25 +00:00
2012-01-05 19:00:36 +00:00
2012-08-10 18:19:57 +00:00
2012-10-22 17:50:54 +00:00
2012-10-22 17:50:54 +00:00
2012-10-18 12:04:56 +00:00
2011-03-01 13:28:27 +00:00
2011-11-21 01:26:10 +00:00
2011-09-16 13:58:51 +00:00
2011-07-17 23:05:24 +00:00
2012-10-26 16:01:08 +00:00
2012-11-15 14:10:51 +00:00
2012-04-17 14:54:00 +00:00
2012-03-13 20:27:48 +00:00
2011-01-06 22:09:37 +00:00
2013-02-05 20:08:33 +00:00
2013-03-27 23:07:43 +00:00
2013-01-23 14:37:05 +00:00
2012-12-20 00:34:54 +00:00
2011-01-09 14:34:56 +00:00
2012-07-11 18:50:50 +00:00
2012-06-22 07:06:40 +00:00
2012-06-25 05:41:16 +00:00
2012-01-23 16:31:46 +00:00
2012-09-04 23:16:55 +00:00
2012-04-12 17:43:59 +00:00
2011-11-15 20:11:03 +00:00
2012-11-15 00:51:57 +00:00
2013-03-04 16:07:55 +00:00
2012-12-05 08:04:20 +00:00
2011-02-09 19:08:21 +00:00
2012-03-19 00:36:32 +00:00
2013-03-19 14:13:12 +00:00
2011-11-07 06:44:47 +00:00
2011-10-16 14:16:46 +00:00
2011-11-07 15:43:11 +00:00
2012-05-31 17:27:05 +00:00
2011-11-19 14:10:16 +00:00
2011-08-19 08:29:10 +00:00
2012-01-26 16:35:09 +00:00
2013-03-18 17:23:58 +00:00
2012-12-19 20:08:06 +00:00
2011-11-16 19:06:55 +00:00
2012-12-28 06:52:53 +00:00
2013-03-23 15:11:53 +00:00
2013-03-18 17:23:58 +00:00
2013-02-17 21:37:32 +00:00
2013-03-09 02:32:23 +00:00
2012-09-14 21:28:56 +00:00
2013-03-09 10:16:08 +00:00
2013-03-02 00:53:12 +00:00
2013-03-09 09:07:13 +00:00
2013-02-17 11:48:16 +00:00
2012-11-13 12:52:31 +00:00
2013-03-09 02:32:23 +00:00
2011-08-16 20:07:47 +00:00
2013-03-21 23:02:19 +00:00
2013-03-21 22:59:01 +00:00
2013-03-21 23:02:19 +00:00
2011-09-16 13:58:51 +00:00
2011-09-16 13:58:51 +00:00
2013-03-09 02:32:23 +00:00
2012-02-06 18:15:46 +00:00
2012-01-02 12:12:10 +00:00
2011-06-26 18:26:20 +00:00
2013-03-21 21:39:15 +00:00
2011-01-04 10:59:38 +00:00
2012-10-25 09:05:21 +00:00
2013-03-02 00:53:12 +00:00
2011-02-25 10:11:01 +00:00
2013-03-02 21:11:30 +00:00
2012-12-05 08:04:20 +00:00
2013-03-17 07:41:14 +00:00
2013-03-02 00:53:12 +00:00
2013-03-02 00:53:12 +00:00
2013-03-09 02:32:23 +00:00
2013-03-15 10:21:18 +00:00
2013-03-19 20:58:17 +00:00
2013-03-28 14:14:28 +00:00
2013-03-19 20:58:17 +00:00
2013-02-06 15:18:46 +00:00
2013-03-27 11:47:52 +00:00
2013-03-27 11:34:27 +00:00
2013-03-20 17:57:00 +00:00
2013-03-19 14:13:12 +00:00
2013-03-09 02:32:23 +00:00
2013-02-21 19:02:50 +00:00
2012-10-22 17:50:54 +00:00
2013-01-14 05:41:40 +00:00
2013-02-21 02:41:37 +00:00
2013-03-02 00:53:12 +00:00
2013-03-20 21:07:49 +00:00
2013-03-23 08:59:34 +00:00
2013-03-09 02:32:23 +00:00
2013-03-22 07:40:34 +00:00
2013-03-15 14:01:37 +00:00
2012-11-22 10:36:10 +00:00