aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 3006b5bc33d6..1320b2a05fb2 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1659,6 +1659,9 @@ long do_io_submit(aio_context_t ctx_id, long nr,
1659 if (unlikely(nr < 0)) 1659 if (unlikely(nr < 0))
1660 return -EINVAL; 1660 return -EINVAL;
1661 1661
1662 if (unlikely(nr > LONG_MAX/sizeof(*iocbpp)))
1663 nr = LONG_MAX/sizeof(*iocbpp);
1664
1662 if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(*iocbpp))))) 1665 if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(*iocbpp)))))
1663 return -EFAULT; 1666 return -EFAULT;
1664 1667