diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-04 17:17:08 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-04 17:17:08 +0200 |
commit | 67417f9c262e2cd4b706eba3e1fd879d0bebc6d8 (patch) | |
tree | 5ab867187357c4c0e23e409f42f0e0dff63d6fa8 /fs/dax.c | |
parent | tty/serial: atmel: enforce tasklet init and termination sequences (diff) | |
parent | Linux 4.7-rc6 (diff) | |
download | linux-67417f9c262e2cd4b706eba3e1fd879d0bebc6d8.tar.xz linux-67417f9c262e2cd4b706eba3e1fd879d0bebc6d8.zip |
Merge 4.7-rc6 into tty-next
We want the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/dax.c')
-rw-r--r-- | fs/dax.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -208,7 +208,12 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, dax.addr += first; size = map_len - first; } - max = min(pos + size, end); + /* + * pos + size is one past the last offset for IO, + * so pos + size can overflow loff_t at extreme offsets. + * Cast to u64 to catch this and get the true minimum. + */ + max = min_t(u64, pos + size, end); } if (iov_iter_rw(iter) == WRITE) { |