Eric Sandeen
023954351f
dax: fix offset overflow in dax_io
...
This isn't functionally apparent for some reason, but
when we test io at extreme offsets at the end of the loff_t
rang, such as in fstests xfs/071, the calculation of
"max" in dax_io() can be wrong due to pos + size overflowing.
For example,
# xfs_io -c "pwrite 9223372036854771712 512" /mnt/test/file
enters dax_io with:
start 0x7ffffffffffff000
end 0x7ffffffffffff200
and the rounded up "size" variable is 0x1000. This yields:
pos + size 0x8000000000000000 (overflows loff_t)
end 0x7ffffffffffff200
Due to the overflow, the min() function picks the wrong
value for the "max" variable, and when we send (max - pos)
into i.e. copy_from_iter_pmem() it is also the wrong value.
This somehow(tm) gets magically absorbed without incident,
probably because iter->count is correct. But it seems best
to fix it up properly by comparing the two values as
unsigned.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2016-06-27 12:18:44 -07:00
..
2016-05-27 15:39:43 -04:00
2016-01-20 17:09:18 -08:00
2016-05-28 16:50:24 -07:00
2016-05-27 15:26:11 -07:00
2016-05-02 19:49:32 -04:00
2016-05-23 17:04:14 -07:00
2016-05-09 11:41:14 -04:00
2016-06-18 05:57:59 -10:00
2016-06-01 10:29:39 +02:00
2016-06-01 10:32:14 +02:00
2016-05-27 15:39:43 -04:00
2016-05-02 19:49:29 -04:00
2016-05-09 11:41:13 -04:00
2016-05-09 11:41:14 -04:00
2016-05-07 10:32:33 -07:00
2016-06-15 04:56:35 -07:00
2016-06-05 10:36:01 -07:00
2016-04-04 10:41:08 -07:00
2016-06-10 12:10:02 -07:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-05-17 17:05:30 -07:00
2016-05-02 19:49:29 -04:00
2016-05-27 17:14:05 -07:00
2016-05-27 17:14:05 -07:00
2016-05-27 15:39:43 -04:00
2016-05-17 15:05:23 -07:00
2016-05-09 11:41:14 -04:00
2016-06-01 10:29:09 +02:00
2016-05-27 20:09:16 -04:00
2016-05-27 17:14:05 -07:00
2016-05-27 20:09:16 -04:00
2016-05-27 15:39:43 -04:00
2016-05-12 19:49:30 -04:00
2016-05-28 16:50:24 -07:00
2016-04-04 10:41:08 -07:00
2016-05-11 00:00:29 -04:00
2016-05-24 12:55:26 -07:00
2016-05-27 15:39:43 -04:00
2016-05-27 15:39:43 -04:00
2016-05-27 20:09:16 -04:00
2016-01-07 10:10:50 -05:00
2016-05-09 11:42:19 -04:00
2016-05-02 19:49:32 -04:00
2016-04-04 10:41:08 -07:00
2016-05-27 17:20:27 -07:00
2015-08-13 10:22:06 -04:00
2016-06-15 22:03:53 -04:00
2016-05-23 17:04:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-01 19:58:39 -04:00
2016-05-27 17:14:05 -07:00
2016-05-09 11:41:14 -04:00
2016-05-09 11:41:14 -04:00
2016-05-27 15:39:43 -04:00
2016-06-15 14:18:59 +02:00
2016-06-10 12:10:02 -07:00
2016-04-04 10:41:08 -07:00
2016-05-09 11:41:14 -04:00
2016-05-09 11:41:14 -04:00
2016-04-26 12:00:48 -04:00
2016-05-20 17:58:30 -07:00
2016-06-19 07:05:14 -10:00
2016-05-09 11:41:15 -04:00
2016-05-09 11:41:15 -04:00
2015-11-13 21:53:18 -08:00
2016-05-02 19:49:32 -04:00
2016-01-22 18:04:28 -05:00
2016-05-27 18:49:29 -07:00
2016-05-19 13:00:35 +02:00
2016-05-02 19:49:32 -04:00
2016-05-27 17:14:05 -07:00
2016-05-23 17:04:14 -07:00
2016-01-22 18:04:28 -05:00
2016-05-27 20:09:16 -04:00
2016-05-28 16:34:59 -07:00
2016-06-07 22:07:09 -04:00
2016-06-07 22:07:09 -04:00
2014-12-13 12:42:51 -08:00
2016-05-27 15:26:11 -07:00
2016-01-22 18:04:28 -05:00
2014-12-13 12:42:51 -08:00
2016-05-26 19:34:26 -07:00
2016-05-19 19:12:14 -07:00
2016-03-29 10:11:44 -07:00
2016-02-14 14:25:59 -08:00
2016-05-24 12:55:26 -07:00
2016-06-07 22:07:09 -04:00
2016-06-27 12:18:44 -07:00
2016-06-07 21:26:55 -04:00
2016-05-27 14:49:37 -07:00
2015-08-17 18:39:46 -04:00
2016-03-22 15:36:02 -07:00
2016-05-19 19:12:14 -07:00
2016-05-23 17:04:14 -07:00
2016-01-09 02:55:37 -05:00
2016-03-22 15:36:02 -07:00
2015-08-07 04:39:40 +03:00
2016-05-02 19:49:28 -04:00
2016-01-19 12:02:23 -05:00
2015-04-09 11:39:55 -05:00
2016-05-20 17:58:30 -07:00
2016-05-02 19:49:28 -04:00
2016-01-08 21:20:11 -05:00
2016-01-22 18:04:28 -05:00
2016-05-19 15:13:17 -06:00
2016-05-23 17:04:14 -07:00
2016-05-27 20:09:16 -04:00
2016-01-22 18:04:28 -05:00
2016-03-26 12:59:04 -07:00
2016-02-22 22:44:04 -05:00
2015-06-30 19:44:56 -07:00
2016-04-04 10:41:08 -07:00
2016-06-07 20:41:36 -07:00
2016-06-06 20:52:03 -05:00
2015-09-11 15:21:34 -07:00
2016-05-17 14:41:03 -07:00
2016-04-04 10:41:08 -07:00
2016-05-05 09:54:45 -05:00
2015-07-22 20:33:27 -05:00
2016-05-27 15:39:43 -04:00
2016-03-16 13:09:08 -04:00
2016-05-18 11:46:23 -07:00
2016-05-26 00:13:25 -04:00
2016-05-19 19:12:14 -07:00
2016-04-14 12:56:09 -07:00
2015-08-07 04:39:40 +03:00
2016-05-11 00:00:29 -04:00
2016-01-16 11:17:23 -08:00
2016-04-18 11:18:55 +02:00
2016-04-04 10:41:08 -07:00
2016-01-17 11:13:55 +01:00
2016-05-20 17:58:30 -07:00
2016-01-22 18:04:28 -05:00
2016-05-27 20:09:16 -04:00