diff options
author | David S. Miller <davem@davemloft.net> | 2016-07-06 19:35:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-06 19:35:22 +0200 |
commit | 30d0844bdcea9fb8b0b3c8abfa5547bc3bcf8baa (patch) | |
tree | 87302af9e03ee50cf135cc9ce6589f41fe3b3db1 /fs/dax.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-30d0844bdcea9fb8b0b3c8abfa5547bc3bcf8baa.tar.xz linux-30d0844bdcea9fb8b0b3c8abfa5547bc3bcf8baa.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/usb/r8152.c
All three conflicts were overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
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) { |