summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-05-19 16:33:26 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-05-19 16:33:26 -0700
commit115a54162a6c0d0ef2aef25ebd0b61fc5e179ebe (patch)
treed78a700b448162f1712819094d7e4c8846ebf9e5 /fs
parent3c9e66568ad40dc17518fa00e2b28c3b450040d4 (diff)
parent4e89b7210403fa4a8acafe7c602b6212b7af6c3b (diff)
downloadlinux-115a54162a6c0d0ef2aef25ebd0b61fc5e179ebe.tar.gz
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fix from Al Viro: "Stable fodder fix: copy_fdtable() would get screwed on 64bit boxen with sysctl_nr_open raised to 512M or higher, which became possible since 2.6.25. Nobody sane would set the things up that way, but..." * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix multiplication overflow in copy_fdtable()
Diffstat (limited to 'fs')
-rw-r--r--fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/file.c b/fs/file.c
index c8a4e4c86e55..abb8b7081d7a 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -70,7 +70,7 @@ static void copy_fd_bitmaps(struct fdtable *nfdt, struct fdtable *ofdt,
*/
static void copy_fdtable(struct fdtable *nfdt, struct fdtable *ofdt)
{
- unsigned int cpy, set;
+ size_t cpy, set;
BUG_ON(nfdt->max_fds < ofdt->max_fds);